We can pray Psalm 51 when we recognize that we need forgiveness, that we want forgiveness:
Let me hear joy and gladness; let the bones that you have crushed rejoice.
Hide your face from my sins, and blot out all my iniquities.
And we can pray Psalm 51 when we want what forgiven people have--restoration
Create in me a clean heart, O God, and put a new and right spirit within me.
Do not cast me away from your presence, and do not take your holy spirit from me.
Restore to me the joy of your salvation, and sustain in me a willing spirit.
Note: Look at Ezekiel 36:24-28.