21 For what follows? “They will be captious against the soul of the righteous”. Why will they be captious? Because they can find no true ground of accusation. For how were they captious against our Lord? They made up false accusations, because they could not find true ones. “And will condemn the innocent blood.” Why all this takes place, he will show in the sequel.
22. “And the Lord has become my refuge”, he says. You would not seek such a refuge, if you were not in danger: but you have therefore been in danger, that you might seek for it: for He teaches us by sorrow. He causes me tribulation from the malice of the wicked: pricked with that tribulation, I begin to seek a refuge which I had ceased to seek for in that worldly prosperity. For who, that is always prosperous, and rejoices in present hopes, finds it easy to remember God? Let the hope of this life give way, and the hope of God advance; that you may say, “And the Lord has become my refuge:” may I sorrow for this end that the Lord may become my refuge! “And my God the help of my hope.” For as yet the Lord is our hope, since as long as we are here, we are in hope, and not in possession. But lest we fail in hope, there is near us a provision to encourage us, and to mitigate those very evils which we suffer. For it is not said in vain, “God is faithful, who will not suffer you to be tempted above that you are able: but will with the temptation also make a way to escape, that you may be able to bear it:” who will so put us into that furnace of tribulation, that the vessel may be hardened, but not broken. “And the Lord has become my refuge: and my God the help of my hope.” Why then did He seem to you to be as it were unjust, in that He spares the evil? See then how the Psalm is now set right, and be thou set right together with the Psalm: for, for this reason the Psalm contained your words. What words? “Lord, how long shall the ungodly, how long shall the ungodly triumph?” The Psalm just now used your words: use therefore yourself the Psalm's words in your turn.
23. “And the Lord shall recompense them according to their works, and after their own malice; the Lord our God shall destroy them”. The words, “after their own malice,” are not said without meaning. I am benefited through them: and yet it is said to be their malice, and not their benefits. For assuredly He tries us, scourges us, by means of the wicked. To prepare us for what does He scourge us? Confessedly for the kingdom of heaven. “For He scourges every son whom He receives; for what son is he whom the father chastens not?” and when God does this, He is teaching us in order to an eternal heritage: and this learning He often gives us by means of wicked men, through whom He tries and perfects our love, which He does will to be extended even to our enemies....Thus also they who persecuted the Martyrs, by persecuting them on earth, sent them into heaven: knowingly they caused them the loss of the present life, while unconsciously they were bestowing upon them the gain of a future life: but, nevertheless, unto all who persevered in their wicked hatred of the righteous, will God recompense after their own iniquities, and in their own malice will He destroy them. For as the goodness of the righteous is hurtful unto the wicked, so is the iniquity of the wicked beneficial unto the righteous....
Source: The Enarrations, or Expositions, on the Psalms (New Advent)