David is known as "a man after God's own heart," he is the writer of the Psalms that we use so often in worship and prayer. He defeated Goliath as a young boy, he was anointed King over Israel by God and he is a hero of faith.
Yet David was a brilliant sinner. Not just your everyday, white lie here and there kinda guy. But a lying, stealing, adulterous, murderous, bad parent kinda guy. I think he broke all of the 10 Commandments!
Yet we view him as a model and a man deeply connected to God.
The thing about David is that through all of his bad choices, weaknesses and sin, he always humbled himself before God and confessed. He was honest about his mistakes, owned them, and vulnerably approached God to ask forgiveness.
In 2 Samuel David confesses that he has sinned by sleeping with Bathsheba and then killing her husband to cover up her pregnancy.
In Psalm 51 David elaborates as he pours out his heart to God
according to your unfailing love;
according to your great compassion
blot out my transgressions.
2 Wash away all my iniquity
and cleanse me from my sin.
and my sin is always before me.
4 Against you, you only, have I sinned
and done what is evil in your sight;
so you are right in your verdict
and justified when you judge.
5 Surely I was sinful at birth,
sinful from the time my mother conceived me.
6 Yet you desired faithfulness even in the womb;
you taught me wisdom in that secret place.
wash me, and I will be whiter than snow.
8 Let me hear joy and gladness;
let the bones you have crushed rejoice.
9 Hide your face from my sins
and blot out all my iniquity.
and renew a steadfast spirit within me.
11 Do not cast me from your presence
or take your Holy Spirit from me.
12 Restore to me the joy of your salvation
and grant me a willing spirit, to sustain me."