When someone does bad to you, but you choose to forgive that person, Allah will consider this as a charity. Your forgiveness is charity.
A hadith from ‘Ubadah ibn as-Samit (may Allah blesses him). He said: I heard the Messenger of Allah (ﷺ) says :
مَا مِنْ رَجُلٍ يُجْرَحُ فِي جَسَدِهِ جِرَاحَةً فَيَتَصَدَّقُ بِهَا إِلَّا كَفَّرَ اللَّهُ عَنْهُ مِثْلَ مَا تَصَدَّقَ بِهِ
“There is no man who suffers an injury to his body, then he forgives [the one who caused it] as an act of charity, but Allah will absolve his sins commensurate with the extent of his charity”.[Ahmad, classed as sahih by al-Albani in as-Sahihah].
Islam allows you to repay badness in kind, but forgiving is better and considered as charity.
Help your brothers in Islam by donating to help poor orphans at ussunnah.org/orphans.