You forgave the iniquity of my sin
I acknowledge my sin unto thee, and mine iniquity have I not hid. I said, I will confess my transgressions unto the Lord; and thou forgavest the iniquity of my sin. Selah. Psalm 32:5
We cannot hide our sins from God. For he is the one whose eyes are in every place, beholding the evil and the good (Prov. 15:3). We cannot flee from his presence; if we make our bed in hell, he is there (Ps. 139:7-8). Hence, the only logical thing to do is to be honest with God about our sins and to confess them before him.
But the confession that David practiced in the psalm was not a lips-only version - one in which he was lying about his attitude towards his sins. No, David was genuinely grieved over his sin and wanted to turn from it. This was a confession with repentance, which is the only kind of confession God will look upon with favor.
However, we confess our sins, not only to turn from sins, but to turn to God. We won't turn from our sins if we don't see God's glory and worthiness. For you will worship something: either the sins in your life, or God. David understood that sin cut him off from fellowship with God, which he deplored, since he truly understood how infinitely greater a treasure God was than the pleasures proffered by sin.
Hence the reason why David was so concerned about forgiveness. But here is the amazing thing about this: God forgave David's sin. He didn't turn or push him away. He didn't tell him he had sinned too much or too often. Rather, when David came to him with true confession and repentance, God forgave the iniquity of his sin.
Dear brothers and sisters, you need not doubt that God will forgive your sins, when you come to him, as David did, in repentance and faith. God will forgive us, not because we merit it, but because God is gracious and merciful. And we know why: because God's Son paid the debt we owe and satisfied the demands of the law we have broken. There is real forgiveness, immediate forgiveness, and full forgiveness in Jesus Christ.