It is narrated from Imam Sajjad (AS) who said: The right of the person who has done bad to you by words or by action is that, if that bad deed is on purpose, forgiving him/her is better for you because your forgiveness makes that person to be discouraged from bad deeds and corrects his/her behaviour [1].
[1] Beharul Anwaar, Vol. 71, page 20, Hadith 2.
source : Shafaqna