Summary: The claim to innocence can be rightly made only by the Savior, but, instead of seeking to escape judgment, He submitted Himself to wrath for my sake.
If you're like me when you read Psalm 7, you may find your heart resonating with the opening verses:
 O LORD my God, in you do I take refuge; save me from all my pursuers and deliver me,  lest like a lion they tear my soul apart, rending it in pieces, with none to deliver” (ESV).
There are people and circumstances by which I feel threatened, and I long to find refuge in God. The psalm’s opening gives me a sense of hope that I might find safety in the storm, that I might run to God and be welcomed and comforted.
But then I come to the next verses, and they leave me cold. As I read them, I feel isolated and excluded from God’s protection:
 O LORD my God, if I have done this, if there is wrong in my hands,  if I have repaid my friend with evil or plundered my enemy without cause,  let the enemy pursue my soul and overtake it, and let him trample my life to the ground and lay my glory in the dust….  Judge me, O LORD, according to my righteousness and according to the integrity that is in me.”
Truly, I am vulnerable and without a claim on God’s protection if I must, in order to have it, verify that I have done no wrong. Were I to say, as David does here (in so many words), “If I have done wrong, then let me be destroyed” — then I would be destroyed! How can I say, as David does in verse 8, “Judge me, O LORD, according to my righteousness and according the integrity that is within me”? I shudder to think that God would judge me according to such criteria.
In point of fact, this is what the Law does. It establishes a standard of perfection (the “righteousness” and “integrity” of verse 8) and then, like a mirror, exposes my failure to meet such a standard. The Apostle Paul confirms this. He writes in one place, “Through the law comes knowledge of sin” (Rom. 3:20). And in another place he says, “If it had not been for the law, I would not have known sin” (Rom. 7:7). If I have to qualify in terms of my own “righteousness” and “integrity” in order to find refuge in God, then I will be excluded from His protective love. And the Law demonstrates to me that I do not measure up. I cannot justify myself. Am I then without hope? Am I to be condemned?
Thankfully, there is grace. To quote Paul again, “All who believe…are justified by his grace as a gift, through the redemption that is in Christ Jesus” (Rom. 3:22, 24). According to the gospel, God is merciful to sinners like me, who cannot plead their own righteousness. He is “the justifier of the one who has faith in Jesus” (Rom. 3:26).
The comfort that I find in Psalm 7 comes as a result of reading it through the lens of the evangel, the good news that God rescues unworthy sinners through Him who is worthy, that is, through Christ. The claim to innocence in Psalm 7 can be made rightly only by the Savior. He alone can say, “I have not done this; there is no wrong in my hands.”