I imagine David wrestling in prayer. He is lonely and afflicted (v16) and as he pleads for himself he keeps reminding himself of how great God is.
No one whose hope is in you will ever be put to shame v 3
You are God my savior v 5
Your love and mercy are from of old v6
You are good and upright v7-8
The LORD is loving and faithful v10
The LORD confides in those who fear him v14
So in this context he prays for protection (v2,20), direction (v4-5), preservation (v21) and forgiveness (v11,18).
Is he too self absorbed? We are often taught to pray for ourselves last; that others should come first. Just so, but at times we are cast down, depressed and hardly able to continue. At these times we can restore our hope by reciting the attributes of our God and claiming his promises. So David climaxes his prayer with a demand that God redeems Israel (and remember that the Church is the Israel of God). Demand? Too strong a word? I would have put 'plea' but that becomes too speculative and plaintive. God's response is sure; we do not have to beg, merely to ask. 'Demander' in the French sense.