I appreciate this psalms disposition toward righteousness. Clearly the psalmist is striving toward righteousness, but it is not self-righteousness. He does what is right, but he knows his need of the Lord. As verse 11 says, he walks in integrity even while seeking hate Lord to redeem and be gracious.
Verse 3 explains how he does this. The psalmist walks in righteousness with the steadfast love of the Lord before his eyes. He is walking in faith by walking in the Lord’s faithfulness.
True righteous obedience trusts not in itself, but in the faithfulness of God to graciously both redeem and transform.