Do not take revenge nor bear grudge among your people, and you should love your neighbor as yourself, I am God (Leviticus 19:18).
This verse may well be the Torah's most difficult demand. The Talmud gives an example of revenge: someone refuses to give you a loan; then, when he or she asks you for one, you say, "I will not lend you money because you turned me down when I was in need." Bearing a grudge comes when you do give the person the loan, but say, "I want you to see that I am more decent than you. I am willing to lend you the money, even though you did not give me that consideration." The Torah forbids both reactions; we must loan in silence.
R' Moshe Chaim Luzzato says that revenge is one of the sweetest sensations a person can have, and that the Torah's demand that we suppress this impulse is asking us to virtually be akin to angels (Path of the Just, Chap. 11). Still, the fact that we are required to do so tells us that this level of control is within our grasp. The key to this is contained in the end of the verse cited above.
The Torah wishes us to consider the other person as we would ourselves. For example, if a person stubbed his toe and felt a sharp pain, he would hardly hit his foot as punishment for having hurt him. Just as we would neither take revenge nor bear a grudge on a part of our own body, we should not do so toward another person.