In the name of God, Most Merciful, Most Just.
If you can’t forgive others, how do you expect that God would forgive you?
Because God the Exalted Says:
”Let them pardon and overlook. Would you not love for God to forgive you? God is Forgiving and Merciful”.
This is a prove that God Says like that, not me.
“Show forgiveness, enjoin what is good, and turn away from the ignorant”.[surah An-Nur 24:22]
And also God Says:
”Verily, the Hour is coming, so forgive them with gracious forgiveness”.[surah Al-raf, 7:199]
So this means, if your friend betray you, then leave him alone, find another friend but only this time, a true friend who does not betray you. And forgive others so that God will forgive you, because He loves to see people forgiving each other, because
”The believers are those who spend in charity during ease and hardship and who restrain their anger and pardon the people, for God loves the doers of good”. [Surah Al-Hijr, 15:85]
Even prophet Muhammad says:
”Be merciful to others and you will receive mercy. Forgive others and God will forgive you.”
Yes, it just to forgive others for the sake of God, because God Says in Quran:
Quran 5:8 says, "Do not let the hatred of people prevent you from being just. Be just." The elsewhere in The Quran it is mentioned "God loves those who act justly." ~ Quran 49:9
So this includes, forgiving others, this is one of the parts of being a just person.
And of course if you are not able to forgive your friend, then say like this:
My Lord, forgive my people for they do not know.
And if you can’t either this, then, ask God To forgive you and finish, next time you should forgive others. But, if you forgive others, it is something that benefits you. So, it is your choice, what you choose, You can’t or you can?
Conclusion: it is better to forgive your friend and leave him alone or give him the last chance to prove himself that, he can be a good person with, if not, then pardon him, then leave him, because you will earn more good deeds if you forgive others, and God will love you, because He loves justice and kindness. And the end of life is approaching fast, so better forgive him so that you can be safe on the day of judgement where God will judge you. If you wish to go to Heaven, then be good(i.g. forgive others and obey what God tells you to do) then if God wishes, He will put you to Heaven because of being kind with others including your family.
And God knows best.