At a moment in his life when his sin was searing his soul with grief, King David turned to the Lord, whom he knew was a God of grace and the justifer of the ungodly. These are words for the broken.
10 Create in me a clean heart, O God, and renew a right spirit within me. 11 Cast me not away from your presence, and take not your Holy Spirit from me. 12 Restore to me the joy of your salvation, and uphold me with a willing spirit.
16 For you will not delight in sacrifice, or I would give it; you will not be pleased with a burnt offering. 17 The sacrifices of God are a broken spirit; a broken and contrite heart, O God, you will not despise.
Psalm 51:1-2, 10-12, 16-17 (ESV)