It says in Mishlei “One who repays good with evil, evil will never move from his house”. It is an obligation on a person who received a favor from his friend that it should remain engraved in his heart for all of his days that he should never do his benefactor any bad, and pay him back in every way that he can. Even if his benefactor has also done bad things to him, he should forget the bad and only remember the good, for a person must try to follow in the ways of Hashem, and it says in Yeshayah “These will also be forgotten”, when referring to the golden calf, that Hashem (behaves as if he) forgot it, whereas “And I will not forget you”, refers to receiving the Torah which Hashem remembers.
Go out and learn from Moshe Rabbeinu, who did not hit the river or the earth, because he had received a favor from them. Chazal also say that Moshe did not himself take Hashem’s revenge against Midyan, for he had grown up amongst them. Chazal say that one who opens an entrance for his friend, must be honored by that friend more than he honors his father and mother. This being the case even if one has only received some bread from one’s friend, how much more so is this true if he received much good from his friend, and how many more times if he received the type of favor which helped his soul (for example if he taught him Torah or took him away from a wicked path and brought him to a good path, which is the greatest favor which one can do), his obligation to appreciate his kindness and to treat him with honor. If he did not treat him with respect and honor, there is no ingratitude worse than this. In the same way one should calculate for himself how much gratitude he owes his Creator who gives him so much unlimited goodness, and we owe him unlimited gratitude.