Psalms - Chapter 30
Every Day and Twice on Chanukah
David composed this Psalm to be recited at the dedication of the Temple, in the days of Solomon. He praises G-d for raising him out of the depths and not letting David's enemies triumph over him. When he was ill, David cried out to G-d, Who healed him. (According to Rashi, by forgiving David's sin, allowing him to live.) G-d saved David's soul from the grave and did not allow his enemies to drag him down. (The word "sheol" - "the pit" - means the grave, though occasionally it can refer to Gehinnom - Hell. "Sheol" is spelled the same as "Shaul" - Saul, in Hebrew - possibly alluding to G-d saving David from the pursuits of his predecessor.)
David tells all those who are devoted to G-d to sing to Him and give thanks. His anger is momentary, but doing the right thing pleases Him, bringing us life. People lie down crying, but they arise rejoicing. (The Radak applies this verse to this world - a place of trouble - and the Next World - a place of bliss.)
David got complacent and thought he could never slip. It was through G-d's good graces that He supported David and allowed him to continue to enjoy his position. When David cannot perceive G-d's will, he becomes confused and afraid. When this happens, he calls out to G-d.
After he dies, David won't be good for anything. (The same is true of everyone.) The dust to which we return neither praises G-d nor attests to the truth of His Torah. G-d traded David's mourning (over his sins) for joy (presumably over his forgiveness). David says that he was preserved so that he could continue to sing praises to G-d.
Originally recited at the dedication of the Temple, this Psalm is now recited daily at the beginning of the morning service. This is a miniature reenactment, as the morning service is the daily inauguration of our synagogues, which take the place of the Temple for the time being. This Psalm is recited an additional time on Chanukah, the holiday that commemorates the re-dedication of the Temple.