"Why are you cast down, O my soul, and why are you in turmoil within me? Hope in God; for I shall again praise him, my salvation and my God." (Psalm 42:11 ESV)
In his classic work, Spiritual Depression (Eerdmans, 1965), Martyn Lloyd-Jones addresses upfront what he considers to be the ultimate cause of spiritual depression, and what generally the cure will be:
"The ultimate cause of all spiritual depression is unbelief. For if it were not for unbelief even the devil could do nothing. It is because we listen to the devil instead of listening to God that we go down before him and fall before his attacks. That is why this psalmist keeps on saying to himself, 'Hope thou in God for I shall yet praise Him...' He reminds himself of God. Why? Because he was depressed and had forgotten God, so that his faith and his belief in God and in God's power, and in his relationship to God, were not what they ought to be. We can indeed sum it all up by saying that the final and ultimate cause in just sheer unbelief.
"What about the treatment in general? Very briefly at this point, the first thing we have to learn is what the Psalmist learned -- we must learn to take ourselves in hand. This man was not content just to lie down and commiserate with himself. He does something about it, he takes himself in hand. But he does something which is more important still, that is he talks to himself. This man turns to himself and says: 'Why art thou cast down O my soul, why art thou disquieted within me?' He is talking to himself, he is addressing himself...
"I suggest that the main trouble in this whole matter of spiritual depression in a sense is this, that we allow our self to talk to us instead of talking to our self. Am I trying to be deliberately paradoxical? Far from it. This is the very essence of wisdom in this matter. Have you realized that most of your unhappiness in life is due to the fact that you are listening to yourself instead of talking to yourself? Take those thoughts that come to you the moment you wake up in the morning. You have not originated them, but they start talking to you, they bring back the problems of yesterday, etc. Somebody is talking. Who is talking to you? Your self is talking to you. Now this man's treatment was this: instead of allowing this self to talk to him, he starts talking to himself. 'Why art thou cast down, O my soul?' he asks. His soul had been depressing him, crushing him. So he stands up and says: 'Self, listen for a moment, I will speak to you.' ...
"The main art in the matter of spiritual living is to know how to handle yourself. You have to take yourself in hand, you have to address yourself, preach to yourself, question yourself. You must say to your soul: 'Why art thou cast down' -- what business have you to be disquieted? You must turn on yourself, upbraid yourself, condemn yourself, exhort yourself, and say to yourself: 'Hope thou in God' -- instead of muttering in this depressed, unhappy way. And then you must go on to remind yourself of God, Who God is, and what God is and what God has done, and what God has pledged Himself to do."
~ Martyn Lloyd-Jones, Spiritual Depression, pp. 20-21.