The clean heart is received. Look at verse 16. The law had no sacrifice for what David did. No bull or goat could cover adultery and the killing of Uriah. He came to the altar empty-handed and brought a broken and contrite heart. God says he won’t despise it.
His mercy still stands open when every door is shut.