It's strange how sin propagates sin. First, David saw Bathsheba, then he had her brought to him. That was enough to have caused her husband alarmed. But then David went to extremes to prevent her husband's suspicion. Uriah had no guile and never accused either of them. Each step in the deception drew the net of sin tighter on David. You can't get out of the hole by digging it deeper. David's own conscience drove him to hide the adultery but brought murder to the forefront.
We see the righteousness and honor of Uriah. He came at David's call, but he would not go home and sleep on clean sheets and share company with his wife when the troops were in the field. Even drunk, he remained fit for duty and honorable.
David did a lot of work to pull off the subterfuge and involved several people in the plot. Bathsheba was complicit in the plot, and Joab did the final stroke of betrayal leaving Uriah without support in the battle. In his confession, David says that he sinned against God. All sin is ultimately against God even when others are hurt by it. David takes no thought of the others who suffered from his sin.
In the verses of his confession, David never defends his actions. He repeatedly acknowledges his own responsibility and accepts the righteous judgment of God. He uses metaphors of cleaning the dirt from his soul (vs.2 and7) renewal of a steadfast spirit (vs. 10 and 11.) When he is restored through repentance, he wants to teach sinners the value and benefit of being faithful. He doesn't want Israel to be punished for his sin.
About the first thing that is lost in sin, is Joy. David asks God to restore the Joy of His salvation. Many times he seeks the nearness of God's presence. Once he prays that God would restore his broken bones. Every part of his life was affected by the sin. He calls on God to restore "a clean heart within him."
We may not have committed the same sin as David, but his repentance is a model of us. Read it for yourself!
The Psalm is spoken in accusation against Doeg who had killed 85 priests. It would be easy to charge the events to Saul, and rail against him, but David thought of Saul in grander terms than that. Although Saul sought him and chased him in the wilderness, David never gives in to anger or hostility aginst Saul. Saul was his father-in-law and the father of his dearest friend. David had opportunities to kill Saul, but he never raised his hand against him even though Saul threw a spear at him.
Read the dramatic story of David's rise to rule over Israel in 1 Samuel 18-2 Samuel 2.
We still have the option to seek God's direction like David did and be obedient to it when we face financial and political choices. David is a good model to look to for strength in tough times. Like David, we must also remember to praise him for answers and resources. Offerings of thanksgiving are appropriate also.
Make this Psalm a regular in your daily reading.
Many expositors view this Psalm was written on the occasion of Absalom's rebellion with Ahithophel as the treacherous friend, but I agree with Matthew Henry's view. It is likely that the distress David is experiencing is from the bitterness from his former companion Saul whom he played the harp for to quiet his spirit.
David details his emotions since he is constantly attacked by Saul's words and actions. This Psalm is an excellent resource for those who live in stressful situations and feel persecuted by those who are close to them.
Remember these words when you feel attacked and persecuted. "Cast your cares on the Lord and he will sustain you," (vs. 22)
He lists the calamities that are assured to the wicked, but David's trust is steadfastly in God. He addresses God in closing, "as for me I trust in you."(vs. 23)
Bible references are from the NIV. Matthew Henry's Commentary was consulted in writing this post.