Can I ask God to avenge my enemies?
David did it. His psalms many contains contents of asking for revenge.
So, it is justified to ask God avenge my foes.
Did David walk a perfect walk? We should be praying that our enemies come to the truth.
Didn't David also have mercy on his enemies? Do you suppose YHWH was merciful toward David's missteps?
YHWH calls us to be merciful.
(CLV) Mt 5:7
"Happy are the merciful, for they shall be shown mercy.
We should treat others as we wish to be treated.
King James Bible
Therefore all things whatsoever ye would that men should do to you, do ye even so to them: for this is the law and the prophets.
We are not to take pleasure in the downfall of our enemies.
Proverbs 24:17-18
English Standard Version
17 Do not rejoice when your enemy falls,
and let not your heart be glad when he stumbles,
18 lest the Lord see it and be displeased,
and turn away his anger from him.