"Have mercy on me, O God.... For I know my transgressions, and my sin is always before me." — Psalm 51:1, 3
I recall someone asking me, a number of years ago, why we needed to have a prayer of confession in our worship services. He thought the confession of sin diminished the joy of worship, and he didn't see why forgiven sinners needed to keep asking God to forgive them.
The short answer to this question can be found in the Lord's Prayer. Jesus taught us to pray, "Forgive us our sins, for we also forgive everyone who sins against us" (Luke 11:4). If the prayer that Jesus taught us includes a plea of confession, then clearly believers need to ask for forgiveness regularly. And since the confession of sin in the Lord's Prayer involves our relationships with others, it makes sense to pray this together, as a community of believers who receive and extend forgiveness.
Confession does convey the depressing reality of sin's impact on our lives. In Psalm 51, David is overwhelmed with guilt as he is made aware of his sin. His anguish moves him to repentance.
But notice that this psalm is also joyful as David anticipates praising the God who forgives. Prayers of confession are gateways to joy!
Jesus, who taught us to pray, "Forgive us our sins," is the one by whom those sins are forgiven. Praise the Lord!