Does the Bible say that having fear and doubt is sin? If so, what can we do to rid ourselves of both fear and doubt?
I think fear can be a good thing. When we’re climbing a ladder, it’s good to make sure of our footing, but the best fear is to fear God. For example, “The fear of the LORD is the beginning of wisdom, and the knowledge of the Holy One is insight” (Prov 9:10), so fearing God is a good thing, but the fear of the Lord is not fearing God’s wrath or judgment, but of a deep, reverential respect for God and His Word, the Bible. Fearing God means having a high view of God and His Word, so “the fear of the Lord, that is wisdom, and to turn away from evil is understanding” (Job 28:28), so Solomon’s advice is, “Be not wise in your own eyes; fear the LORD, and turn away from evil” (Prov 3:7). The time when fear is bad is when we fear the unknown future and what it holds and not trusting God with it. Fear is the near opposite of trust, just as doubt is the opposite of certainty, but “God gave us a spirit not of fear but of power and love and self-control” (2 Tim 1:7), so fearing God is good. A “spirit of fear is not.” Fearing anything or anyone else but God is sin. I know…I’ve done it.
I can doubt a lot of things. For example, I get emails all the time that say I’ve won the lotter, but I have great doubts about that because who wins the lottery by not playing it? Those types of phishing schemes are highly doubtful, so doubting is not sin in itself, but when that doubt begins to creep in about the things of God, then it can be a problem. One man I counseled had gone through so much grief that he was certain God did not exist. The more difficult his life became, the more he began to doubt God, and even worse, he began to doubt God’s Word, the Bible. When that happens, it is sin because God’s Word is inspired and it is always true, and if there is anything in this world we can have no doubts about, it’s God’s Word because it’s God-breathed, and we know (or at least should know) that all things work to our good, even if it doesn’t feel like it (Rom 8:28). Certainly, most of us pass through a season of doubt, but most of us don’t remain there. We come out of it, like passing through a dark valley. We might be in a low spot with very little light around us, and feel like God has moved away from us, but God has not changed. If it feels like God’s is far away, then who moved? It wasn’t God! He promises that He will never, ever forsake us or leave us (Heb 13:5), just as He promised Joshua after he took over Israel’s leadership with the passing of Moses (Joshua 1), so when does fear or doubt move from occasionally to almost constant, then that is sin.
Fear and Doubt
When is it sinful to live in fear and doubt? I believe it is sin when we remain in fear and doubt. God wants us to be sure of His promises (John 3:16), and that nothing can separate us from His love once we’ve trusted in Christ (Rom 8:38-39). We must realize that “we are children of God, and if children, then heirs—heirs of God and fellow heirs with Christ, provided we suffer with him in order that we may also be glorified with him” (Rom 8:16b-17). Satan and his demons would love nothing more than to paralyze us with fear, because if we’re fearful, we’re not going to be witnesses for Christ. Doubts planted by the enemy will keep us from confidently sharing God’s Word because we won’t share what we have doubts about, so doubt and fear are the enemy of an effective witness for Christ, but they’re also our enemies too. Fear and doubt rob us of our joy, they rob us of our confidence in God, and they rob us of the assurance of our salvation. Many believers can live in fear of hell fire and begin to doubt God’s Word is true. The best remedy of fear and doubt is truth and trust, and you can find both in the Word of God. A daily reading of God’s Word fortifies our faith and expels the shadows of doubt. When we see what God really thinks of us (i.e. Psalm 103), doubt and fear begin to evaporate, and eventually, they die out and give birth to a new confidence and joy in our standing before God.
The word communion basically means, “mutual participation, a sharing,” or “fellowship,” and since we are commanded to partake of the Lord’s Supper, or Communion, we need one another. And being among the members of Christ’s body, the church, we have their prayers, support, love, and fellowship. This serves to strip away doubt and fear because we see our brothers and sisters living in similar situations or trials, and yet they persevere. They have not allowed circumstances in life to rob them of their joy, assurance, and trust, however if you leave the sheepfold of the Good Shepherd, you don’t have that communion with the rest of the body, and you are not sitting under the teachings of the Good Shepherd Who is Head of the Church. When you don’t hear the Word of God preached and taught, you are left to yourself, and sheep are not good at self-feeding. They don’t always know where the greener pastures are. They may stay in one place, eating the grass down to the roots. And when there’s a famine of the Word, there’s a spiritual famine of the heart. When we’re not fortifying our lives with the Bread of Life, we’re more susceptible to predators, and remember, Satan is roaming about, seeking whom he might devour (1 Pet 5:8). He’s happy when someone’s separated from the fold because Satan goes after the stragglers, just like lions do. And of course, he goes after the weakest of the fold and the ones that are separated from the fold. He zeros in on those who are no longer under the care and protection of the Good Shepherd. That makes them highly vulnerable and much more likely to live in fear and in doubt, and that’s a horrible way for a believer to live. 
As we have read, daily Bible study and reading is a solution to fear and doubt. So is community within the body of Christ, the church. If you are living in fear and doubt, I strongly recommend reading the Gospel of John. This gospel may be the most powerful book in the Bible for alleviating fears and crushing doubt. The Word of God has power (Isiah 55:11; Rom 1:16; 1 Cor 1:18), and we know it is absolutely true; human feelings on the other hand, are highly speculative and very unreliable gauges of truth. Trust God’s Word and your fear and doubts will disappear, and if they come back, remind them that you only fear God. That should slay the dragon of doubt and fear. The Word of God has the ability to do that, so tap that power, because we have no such power.
Here is some related reading for you: Bible Verses About Doubt: 20 Scriptures Quotes 
Resource – Scripture quotations are from The Holy Bible, English Standard Version® (ESV®), Crossway Bibles. (2007). ESV: Study Bible : English standard version. Wheaton, Ill: Crossway Bibles. Used by permission. All rights reserved.