David was a man of strong emotions. In other Psalms he agonizes over his sin and begs God for forgiveness.
In this case, David was confident of his righteousness and calls on God to display his anger and justly deal with the wicked and David’s enemies. David trusted God to protect him from those who pursued him.
Psalm 7: A shiggaion of David, which he sang to the Lord concerning Cush, a Benjamite.
Lord my God, I take refuge in you;
save and deliver me from all who pursue me,
or they will tear me apart like a lion
and rip me to pieces with no one to rescue me.
Lord my God, if I have done this
and there is guilt on my hands—
if I have repaid my ally with evil
or without cause have robbed my foe—
then let my enemy pursue and overtake me;
let him trample my life to the ground
and make me sleep in the dust.
Arise, Lord, in your anger;
rise up against the rage of my enemies.
Awake, my God; decree justice.
Let the assembled peoples gather around you,
while you sit enthroned over them on high.
Let the Lord judge the peoples.
Vindicate me, Lord, according to my righteousness,
according to my integrity, O Most High.
Bring to an end the violence of the wicked
and make the righteous secure—
you, the righteous God
who probes minds and hearts.
My shield[d] is God Most High,
who saves the upright in heart.
God is a righteous judge,
a God who displays his wrath every day.
If he does not relent,
he will sharpen his sword;
he will bend and string his bow.
He has prepared his deadly weapons;
he makes ready his flaming arrows.
Whoever is pregnant with evil
conceives trouble and gives birth to disillusionment.
Whoever digs a hole and scoops it out
falls into the pit they have made.
The trouble they cause recoils on them;
their violence comes down on their own heads.
I will give thanks to the Lord because of his righteousness;
I will sing the praises of the name of the Lord Most High.
David had many trials and sorrows, yet he trusted in God’s justice and praised him for his righteousness
Lord, help me to trust you to punish those who cause horror in our world