King David wrote Psalm 51 after he was confronted with all of his sins in regards to Bathsheeba: adultry, murder, lies, deception....
Create in me a clean heart
1 Have mercy on me, O God,
according to your steadfast love;
according to your abundant mercy
blot out my transgressions.
2 Wash me thoroughly from my iniquity,
and cleanse me from my sin!
3 For I know my transgressions,
and my sin is ever before me.
4 Against you, you only, have I sinned
and done what is evil in your sight,
so that you may be justified in your words
and blameless in your judgment.
5Behold, I was brought forth in iniquity,
and in sin did my mother conceive me.
6Behold, you delight in truth in the inward being,
and you teach me wisdom in the secret heart.
7Purge me with hyssop, and I shall be clean;
wash me, and I shall be whiter than snow.
8Let me hear joy and gladness;
let the bones that you have broken rejoice.
9 Hide your face from my sins,
and blot out all my iniquities.
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.
12Restore to me the joy of your salvation,
and uphold me with a willing spirit.
13Then I will teach transgressors your ways,
and sinners will return to you.
14Deliver me from bloodguiltiness, O God,
O God of my salvation,
and my tongue will sing aloud of your righteousness.
15O Lord, open my lips,
and my mouth will declare your praise.
16 For you will not delight in sacrifice, or I would give it;
you will not be pleased with a burnt offering.
17The sacrifices of God are a broken spirit;
a broken and contrite heart, O God, you will not despise.
18 Do good to Zion in your good pleasure;
build up the walls of Jerusalem;
19then will you delight in right sacrifices,
in burnt offerings and whole burnt offerings;
then bulls will be offered on your altar.