I greatly hoped for the L-RD; and He inclined to me, and heard my cry (Psalm 40:1).
David hoped, and continued to place his hope, in the Almighty. David teaches us how to save ourselves from despair: Keep on hoping and never give up. The Adversary tries to deceive us into thinking that our failures are meant to break us and that we are defined by our failures. He also wants us to view our illnesses, hardships, and challenges as punishments for all of our wrongdoings. While that can sometimes be one element of our trying situations, every nisayon, test is essentially a nes, a banner, to demonstrate to us His strength and power at work in us.
The Sages teach that David composed this chapter of the Psalms shortly after he had been healed from a long and difficult illness. In a sense, he had immersed himself in the wellspring of hope and faith. He knew that although he faced a tremendously difficult challenge, the Almighty would never forsake him nor let go of him. R' David Kimchi (the Radak) explains that the pit of raging waters from which David was saved was the critical illness that engulfed him and threatened to kill him. And, the Radak continues, through every challenge and trial that one endures and survives, he must sing a new song to the Almighty for his salvation.
In the 1920's, Rav Yechezkel Abramsky, who was living in communist Russia, was involved in the publishing of a Torah magazine called Yagdil Torah. After just two issues, the Communist authorities shut down the magazine, viewing it as a threat to their ideals. A short time later, Rav Abramsky was sentenced to five years of imprisonment in a Siberian slave-labor camp for his "crimes." Although his sentence was eventually commuted, he endured much suffering and pain during that time. Yet, he had one constant source of inspiration: Tehillim, the Psalms. He cherished its every word, finding solace and strength.
Rav Abramsky had always recited the Psalms each day. After he was freed from prison, though, he added one more chapter to his daily regimen: Psalm 40, which begins with the words: "For the conductor, by David, a psalm. I have greatly hoped for Hashem; He inclined to me, and heard my cry. He raised me from the pit of raging waters, from the slimy mud. He set my feet upon a rock, firmly establishing my steps. He put a new song into my mouth, a hymn to our G-d; multitudes shall see and be awed, and they shall trust in Hashem."
Quite often, when one is healed from an illness, even if he remembers to thank the Almighty for his recovery, he can overlook the progression of the illness and his recovery. But if we take time and are careful to examine the kindness that the Almighty has bestowed upon us, we will learn to appreciate every step up to the salvation, for it is through the process that one draws closer to His Creator, hoping and thanking Him every step of the way.
The first half of this Psalm, and the first few verses of the second half, would lead us to believe that David was experiencing the purest bliss that one could imagine when he uttered these words. However, once we read beyond the twelfth verse, we soon realize that this song was written when David was being oppressed by danger on every side and in dire need of deliverance. In the midst of these troubles and trials David recalled the many prior instances in which G-d delivered him from similar situations and he is strengthened as a result.
David's song, then, is a song declaring that the very sufferings which are meted out by the hand of the Almighty are meant to discipline and train us, and in reality constitute His greatest acts of loving-kindness. "He put such a song in my mouth," says David, "so that the multitudes, 'looking upon me' might learn from my own example to trust in G-d even while they fear Him. For He is ready at all times to help those who cry out to Him."
For as our Sages remind us: Nothing can reach to the greatness in which G-d's love can help him who is most hopelessly entangled in struggles both within and without, to rise again.
Let him who is convinced that his views are true and right express them . . . at every opportunity . . . without considering how much support or how much opposition he will encounter. Only falsehood is in need of many supporters in order to win the day; falsehood must have the authority of numbers to make up for what it lacks in justification. Truth, by contrast, will always prevail, even if it takes time. Noble, courageous and pure, expressed with all the fiery zeal and conviction and with all clarity of sure awareness, stated again and again at every opportunity, truth will ultimately gain respect and admiration even of those who do not accept it. The only truth that can be lost beyond recall is that truth whose adherents no longer have the courage to speak up candidly on its behalf. Truth has never gone down in defeat as the result of opposition, it has done so only when its friends are too weak to defend it. - R' S.R. Hirsch