David, after committing grave sins, seeks God's grace and forgiveness by writing Psalm 51. The depths of despair and the heights of grace can be reached through sincere, confession, repentance and prayer for restoration.
Jeff Miller