"Answer me when I call O God of my righteousness!" Psalm 4:1 What could the Psalmist mean by "God of my righteousness"? Is David articulating the doctrine of imputed righteousness? That is, is David concerned with the idea that God "clothes" us with a moral credit that is not our own but His alone? I don't think that the rest of the Psalm bears witness to this. David is not praying about the state of his post-mortality. David's prayer is for salvation and security in the sense of immediate deliverance from enemies. The "God of my righteousness" is the God with whom David and all of Israel is in covenant with. David knows that God is always good for His promises. That is, God is always just in keeping His end of the covenant. God is righteous in regard to the covenant. I think that what David is communicating here is an appeal to the God that David knows is good for His promises. I.e. "God of my righteousness" means, "O God who keeps His promises!" Translation is key here and it would be very nice at this point if I knew how to read Hebrew but I don't. Nevertheless, the rest of the Psalm makes more sense if we use this interpretation. David says that he is "relieved in his distress and appeals to God to "hear my prayer". The whole psalm is in fact a prayer both to God and to the Psalmist himself. To himself, the Psalmist reminds himself that God can be trusted and will be faithful. To God the Psalmist pleads for God to be faithful yet again and celebrates the fact that he, the Psalmist, is in a better position than those who trust in other gods and material goods.
"You have put gladness in my heart, more than when grain and new wine abound. In peace I will both lie down and sleep, for you alone, O Lord, make me to dwell in safety." Psalm 4:7-8
So the question is, was the Psalmist justified in having this confidence in God. And secondly, do we share this same confidence?