Ps 18:20-27 The Lord has dealt with me according to my righteousness; according to the cleanness of my hands he has rewarded me. 21 For I have kept the ways of the Lord; I have not done evil by turning from my God. 22 All his laws are before me; I have not turned away from his decrees. 23 I have been blameless before him and have kept myself from sin. 24 The Lord has rewarded me according to my righteousness, according to the cleanness of my hands in his sight. 25 To the faithful you show yourself faithful, to the blameless you show yourself blameless, 26 to the pure you show yourself pure, but to the crooked you show yourself shrewd. 27 You save the humble but bring low those whose eyes are haughty.
God deals with us according to our righteousness (and also our evil). David defines righteousness as keeping the ways of the Lord. On the other hand, evil is "turning from my God" or rejecting God and His ways. For David, the word of God is paramount: "all his laws are before me." Derek Prince once wrote something to this effect: "Our attitude towards the Living Word is exactly the same as our attitude towards the Written Word - nothing more and nothing less." So, we know we love God when we love His Word. By aligning his life with God's laws, David was able to assert that he has been "blameless before him and have kept myself from sin." So, the Lord has "rewarded me according to my righteousness, according to the cleanness of my hands in his sight."
Righteousness has rewards and I do believe that the righteous will get rewarded in this life, not just in the life to come. Jesus did say in Mark 10:29-30, "I tell you the truth, no one who has left home or brothers or sisters or mother or father or children or fields for me and the gospel will fail to receive a hundred times as much in this present age (homes, brothers, sisters, mothers, children and fields — and with them, persecutions) and in the age to come, eternal life."
But David also said that our attitude towards the Lord will result in us experiencing God exactly the same way: "To the faithful you show yourself faithful, to the blameless you show yourself blameless, to the pure you show yourself pure, but to the crooked you show yourself shrewd." In other words, if we are faithful, blameless and pure, we experience God as faithful, blameless and pure in our life. But if we are crooked (self-centred & unforgiving), we will experience God as "shrewd" - unfair, unloving, etc. So what we experience of God is nothing but a reflection of how we are living our lives. If we are complaining and railing against God for His "injustice" etc., we may be guilty of the same sins we accuse God of.
Father, You are the Mirror of our lives. The more we become like You, the more we know You as You really are. May Your Holy Spirit continue to show us our faults, so that we will not charge You with sins. Amen.