What should we do with those Psalms that are so hard to pray: the ones where the Psalmist protests his innocence and his righteousness. How can we possibly pray them as our prayers?
Dietrich Bonhoeffer answers:
What really concerns us here is not any possible motives behind a prayer, but whether the actual content of the prayer is true or false.This however is where it becomes clear that the believing Christian has not only something to say about his guilt, but also something at least as important to say about his innocence and righteousness. Inherent in the faith of a Christian is the belief that, by the grace of God and the merit of Jesus Christ, he has been made perfectly innocent and righteous in the sight of God, ‘that there is now no condemnation to those who are in Christ Jesus’ (Rom 8:1). And it is inherent in the prayr of a Christian that he should hold fast to this righteousness and innocence in which he has been granted a share, and give thanks for it, relying on the Word of God. So if we take God’s dealings with us at all seriously, we not only may, but we positively must, with conviction and humility make this affirmation:’I was also uncorrupt before him and eschewed mine own wickedness’ (18:23); ‘thou hast proved my heart … and shalt find no wickedness in me’ (17:3). With such prayers on our lips we stand at the heart of the New Testament, in the fellowship of the Cross of Jesus Christ.
The Psalms: Prayer Book of the Bible (Oxford: The Sisters of the Love of God, 1982), 19–20.