Restore to me the joy of your salvation and grant me a willing spirit, to sustain me. Psalms 51:12 NIV
When the prophet Nathan came to David after he had committed adultery with Bathsheba and confronted him, David confessed his sin. Psalms 51 is his confession and requesting forgiveness. Sin separates us from God. David knew that and he could not bear being separated from God. David is asking for his relationship to be restored so he may have joy in the LORD. He is also asking for a state of mind that is always willing and ready to obey God and serve Him.
May this Psalm remind us of the separation that sin causes us from God and others. Forgiveness and confession bring about the healing process. It will restore us with joy.