But faith defeats doubt. And the consolation for doubters is in the Bible. Granted, it becomes a circular argument: if there is no God then the Bible is simply a collection of aphorisms, the dusty opinions of mortal men. But since your funk arises from a choice you make -- doubting -- then your salvation also arises from a choice -- faith.
The brain is a wonderful organ until it goes awry.
I have witnessed miraculous rescues from the abyss of darkest depression through prayer and active faith in God. I'm thinking of one woman, a friend of the family, who had constant suicidal ideation about three years ago. She would lie in bed for weeks on end, as miserable and dark as any human being I've ever seen. She went to a psychiatrist, who prescribed first one powerful antidepressant, and then another. But these treatments brought with them other effects that only worsened her lot. Finally, she thanked God for her life, got up, made her bed, and walked fully in faith that she would be healed. And she was. She says she still has her down moments, but they are temporary and easily bearable. For the most part she is cheerful and fully engaged in life.
I know other apparently equally faithful men and women who have tried and failed repeatedly by these means (prayer and faith). Some have seen improvement, sometimes dramatic, after being prescribed antidepressants. Others simply struggle and struggle, and struggle. I have no answer for these people. Do they have a thorn in the flesh that God in His wisdom has chosen at present not to remove? I don't know. But I pray for them.
There is a powerful mystery of the mind, in the mind, and of the spirit. Its mechanism bewilders me. I know a man who smoked for decades, who simply could not overcome the addiction no matter how much he prayed, no matter how many smoking cessation techniques he attempted. Then he became engaged to a woman who told him flatly she would not marry him if he continued to smoke. His love for this woman had taken over center stage in is life. He told me, "That did it. I stopped smoking immediately and have never looked back. I have never even had a craving. I can't explain it. When I became convinced at some deep level that smoking was no longer an option, it was not something I could even bargain over, at that very moment it was like some 'central controller' said 'Okay, I've unlocked your shackles, and you're free.'"
I believe with some people depression can lift and dissipate by the same mechanism. Each man's struggle is his own. My own struggle is sufficient for me. Thankfully, I have not had to contend with intense depression (or smoking addiction).
Yes, many people find both strength and comfort from their religious beliefs.
But the doubt itself arises from the realization that the "real world" is not the way it is "supposed to be".
I don't know why some people are better able to cope with this disparity better than others.
Apparently there are biochemical/medical factors that at least have some influence over that.
But I think we should not ignore the cultural influences that brainwash us into measuring ourselves by unrealistic expectations. What we view on TV isn't real, and we shouldn't expect that our lives will follow the "exciting" and "entertaining" lifestyles that are portrayed.