As always, Hebrew poetry beckons to a place above both emotions and mere intellect. Thus, it is not necessary to see in this penitent song a specific historical reference. It offers a broad and generic call to live in penitence.
The stricken conscience calls out for God to leave the door open to His courts. The image of God’s anger symbolizes a loss of access, of having been marked as God’s enemy, no longer His servant. The penitent is shaken to the very core of his being, in a state worse than death. David asks if he can be told the length of his sentence. It’s not about any real physical threat or illness, but the sense of no peace with God that disturbs him most.
His cry for mercy is an appeal to the character of God, not anything the penitent can muster. It’s not as if David isn’t willing to taste death for his sins, but it would mean the end of any chance to bring God glory. Far too many assume David is suggesting God will miss out on His due praise and worship if David dies. On the contrary, David doesn’t want to miss out on God’s victory parade. Nor should we see here a literal explanation of David’s view of the afterlife. The image of Sheol is a literary device taken literally only by those poorly educated, and David was among the elite nobility with a high and proper schooling. Otherwise, he would not be able to write such fine Hebrew poetry.
David describes the depth of his sorrow at disappointing God, unable to sleep at night for the weeping. This is no doubt literal enough, but it’s more important for what it signifies in terms of David owning the full depth of sorrow as his own fault. He can’t keep living like this.
Suddenly, his tone changes. The vultures in his life had been gathering in their death watch, but he puts them to flight with a renewed sense of mission and calling. He announces ecstatically that God has restored him and the old warrior David returns to do battle again.