The psalmist often declares his commitment to God and to God’s Word and therefore he believes the Lord should deliver him. Notice these lines:
May your hand be ready to help me,
for I have chosen your precepts.
I long for your salvation, O Lord,
and your law is my delight (119:173-4)
We see commitment; we see request. It is not so much justification of himself as it is overt confidence that, since he has observed the Torah and since God promises blessing to the Torah-doer, he believes God ought to deliver him out of God’s faithfulness.
This is an old theme in this psalm; it is one that tends to make Protestants nervous; it is a theme, however, that has more merit than we might admit. He is not claiming self-righteously that he’s superior to others, but instead of his utter commitment to God and that God promises blessings. His declaration of commitment, then, is not simply an observation but a window into a system: I’ve done my part, You are faithful, now do yours.