In Prayerbook of the Bible (1940), Lutheran theologian Dietrich Bonhoeffer writes:
God’s vengeance did not fall on the sinners, but on the only sinless one, the Son of God, who stood in the place of sinners. Jesus Christ bore the vengeance of God, which the psalm asks to be carried out. Christ calmed God’s anger against sin and prayed in the hour of the carrying out of the divine judgment: “Father, forgive them, for they do not know they are doing!” No one other than he, who himself bore the wrath of God, could pray like this. That was the end of all false thoughts about the love of a God who does not take sin very seriously. God hates and judges the enemies of God in the only righteous one, the one who prays for forgiveness for God’s enemies. Only in the cross of Jesus Christ is the love of God to be found.
So the psalms of vengeance leads to the cross of Jesus and to the love of God that forgives enemies. I cannot forgive the enemies of God by myself, only the crucified Christ can; and I can forgive through him. So the carrying out of vengeance becomes grace for all in Jesus Christ.