In looking at Psalms attached to events in David’s life, we find a number of prayers of David where he calls for the destruction of his enemies. This is jarring to those who have heard Jesus teaching about loving enemies.
Dietrich Bonhoeffer has a great small book, written for people in the church, on how we can pray from the Psalms as followers of Jesus. In his chapter entitled “The Enemies” he writes:
“How can we as Christians pray these psalms?…The enemies referred to here are enemies of the cause of God, who lay hands on us for the sake of God. It is therefore nowhere a matter of personal conflict. Nowhere does the one who prays these psalms want to take revenge in his own hands. He calls for the wrath of God alone. (Rom 12:19). Therefore he must dismiss from his own mind all thought of personal revenge; he must be free from his own thirst for revenge….
This judgment must be made public if God is to stand by his word. It must also be promulgated among those whom it concerns….
God’s vengeance did not strike the sinners, but the one sinless man who stood in the sinners place, namely God’s own son. Jesus Christ bore the wrath of God, for the execution of which the psalm prays. He stilled God’s wrath toward sin and prayed in the hour of the execution of the diving judgment: ‘Father, forgive them, for they don to know what they do!’….That was the end of all phony thoughts about the love of God which does not take sin seriously. God hates and redirects his enemies to the only righteous one, and this one asks forgiveness for them. Only in the cross of Jesus Christ I the love of god to be found…I cannot forgive the enemies of God out of my own resources. Only the crucified Christ can do that, and I through him….Even today I can believe the love of God and forgive my enemies only by boing back to the cross of Christ, to the carrying of the wrath of God…
In this way the crucified Jesus teaches us to pray the imprecatory psalms correctly.”
Dietrich Bonhoeffer, Psalms: The Prayer Book of the Bible, Augsburg, 1970, p. 56-60.