In Psalm 30, David acknowledged the Lord's deliverance and called the congregation to praise Him.The Psalm records David's faults. He was self-reliant and full of pride. As a result, God allowed David to suffer physically in order to get his attention.
In verse 1, David vowed to praise the Lord because he was lifted up from his distress. The depths speaks of nearness of death. God's rescue removed any opportunity for his enemies to gloat.
In verse 2-3, David described his answer to prayer for help: God healed him and spared his life. This is stated figuratively as well: God brought him up from the grave. He was about to die, perhaps because of a physical illness, but the Lord healed him. God's deliverance prevented death.
Because of God's deliverance, David called on the people to sing to and praise the Lord in verses 4-5. The reason for the praise is the temporary nature of God's anger to him; it was but for a moment, only for the night. In the morning came deliverance and joy.
The Psalm concludes with verses 10-12. "Hear, O Lord, and be gracious to me; O Lord, be my helper." 11 you have turned for me my mourning into dancing; You have loosed my sackcloth and girded me with gladness, 12 That my soul may sing praise to You and not be silent. O Lord my God, I will give thanks to You forever."
So often people say "Weeping may endure for a night but joy comes in the morning." They use this verse at funerals or when they're speaking of God's anger. The verse reads: "For His anger is but for a moment, His favor is for a lifetime; Weeping may last for a night. But a shout of joy comes in the morning." Are you experiencing grief? Maybe it's because you're self-reliant and full of pride. Repent and God will deliver you like He did David.