Psalm 31 is longer than most of those immediately preceding it. Only Psalms 18 and 22 are longer. But Psalm 31 has this interesting distinction. As a psalm of trust growing out of an individual lament, "a magnificent psalm of confidence," it has appealed to many biblical characters.

The last set of uplifting contrasts is found in verses 11 and 12, but the wailing and sackcloth of those verses recall the time David has already described in verses 8-10. Wailing describes the words themselves, emphasizing the anguished tone of David's utterance. Sackcloth describes the attitude in which his words were uttered, since sackcloth was the accepted attire of one who was demonstrating personal repentance from sin. These contrasts are: "wailing" versus "dancing" and "sackcloth" versus being "clothed with joy."

Here is a rich set of contrasts: God's “anger” versus God's “favor”; "weeping" versus "rejoicing"; "night" versus "morning"; and "a moment” versus "a lifetime." But here is a warning before we go on. It is true that for the people of God the sufferings of this life are minimized. And even if their miseries should be great here, for reasons known only to God, they are more than compensated for hereafter. This is not true for unbelievers. For them it is exactly the opposite. For those who go their own way now there may be many times of temporary rejoicing.

David knew that God’s anger would be short-lived, while his favor would continue. We know that this was no mere theory for David, because there is an incident from his later life in which he put his convictions regarding this aspect of God's character into practice. Second Samuel 24 and 1 Chronicles 21 tell how David decided to number the fighting men of Israel and sent Joab and the other commanders throughout the kingdom to do it, despite their protest that it was a vain request and would displease God.

Verse 1 contains a very nice image for what happened, for when David says "you lifted me out of the depths" he chooses a verb which was used of drawing a bucket up out of a well. He is saying that it is as if God reached down and pulled him up out of death's pit when, apart from God, there was no hope for him at all.