Revenge is such an ugly word.  How could it be that David haMelech, in his last words of instruction to his son and successor Shlomo haMelech, commands him to take revenge? (Melachim I, 2:3-6)
The gemara (Kiddushin 32a) says that a father and a teacher are allowed to forego their honor but a king is not.  Why does this difference apply only for a king?  
The Malbim explains that David haMelech, in sentence 3, exhorted his son to follow the laws of the Torah.  But in sentence 5, David haMelech says v’gam atah yadata, “and also, you know.”  Why does David haMelech preface his instructions about taking revenge with these words v’gam atah yadata?  Because David haMelech understood that both the internal stability of the kingdom and the international standing of Israel could be jeopardized if these misdeeds were left unavenged.   He reminded his son Shlomo that sometimes the laws of Torah are different for a king, and he will need to know when and how to act differently from how he would act as an ordinary person.  For example, according to Torah law, since Yoav had not been given formal warning, he could not be executed for killing Avner (Shmuel II 3:23-27) and Amasa (Shmuel II 20:9-10).  But under the special rules of the king, it was appropriate and necessary for Shlomo to order Yoav executed in order to stabilize the kingdom.  
This law is limited to the king.  Parents are held to a different standard.  You are not only permitted to forego your honor, you are encouraged to.  The Hebrew term for this is mochel al kvodo.  Literally, this means to “forgive on your honor.”  We can think of this as “to forgive despite your honor.”  That’s why it can be so hard to do.  According to the Maharam Shik, quoting the Chasam Sofer, you are expected to do it.
The gemara (Brachos 6b) says, “kaivan she’nitzrach adam l’brios, panav mishtanos.”  The Chasam Sofer offers the following interpretation: when someone needs you to teach them Torah and yirah you must be willing “to change your face,” to sometimes speak gently and sometimes strongly, sometimes be brief and sometimes lengthy, and sometimes to do things that are neged k’vodo, in violation of your honor. (Maharam Shik on Pirkei Avos, commentary to Chapter 1, Mishna 15)  
As a parent, you are permitted to suspend your honor.  Even when you might be justified in getting angry instead.
Sound difficult?  It is. Very difficult, sometimes.  So much so, that when you do, you earn the love of Hashem.
The gemara (Pesachim 113b) says, “there are 3 whom Hashem loves: someone who does not get angry, someone who does not get drunk, and mi sh’aino ma’ameed al midosov.”  The Ben Ish Chai (in Ben Yehoyada) poses the question, “Given that anger is exceedingly distasteful, as though one had committed idolatry, how can the mere avoidance of anger merit Hashem’s love?”
Here is the Ben Ish Chai’s answer.
It appears to me, with the help of Hashem, that when we say that anger is like idolatry, this is when someone is angry about some worldly matter.  But here the gemara praises someone who does not become angry in a matter of a mitzva;  [the gemara refers to] one who could become angry, on behalf of Hashem’s honor, with someone who is violating Hashem’s will, or angry with his disciple for the sake of the Torah he is teaching him.  One who refrains from anger even in these situations is loved by Hashem.
Three whom Hashem loves: someone who does not get angry, someone who does not get drunk, and mi sh’aino ma’ameed al midosov.  What does that third one mean?  Rashi says it means, “one who does not hurt back someone who hurt him.”  One who does not take revenge.
What are the alternatives?
You can forgive or you can pardon.  What’s the difference between them and when does each one apply?
In the Shemonah Esrai, we say “forgive us, our Father, pardon us, our King.”  A father will forgive a child because he knows and understands the child.  To forgive means to understand how the child made this mistake and feel compassion towards the child who didn’t do well.  A king may pardon, which means not punish, someone who did something wrong.  A king feels resentment, perhaps even anger, but sometimes doesn’t punish the offender.  Neither the father nor the king is numb.  Each of them notices the bad behavior.  They respond differently.  Neither one takes revenge.  Unless, as David haMelech explained, there is a threat to the kingdom.
That’s what makes it hard for us sometimes to forgive.  We feel threatened.   We think that if we don’t hurt someone back, they’ll hurt us again.  Yet we are told to be ma’ameed al midosov, to overcome our natural reaction.  In this case, to overcome our fear, to take the risk of being nicer to someone than they were to us even though we don’t see how they deserve it.  The point is, maybe they don’t.  How often do we fall short and still wish we could be treated with compassion, mercy, forgiveness, encouragement, and acceptance?
Do we deserve it?  Maybe not this time, but we’d like to be given another chance. We are taught that others will treat us the way we treat them, and we know that Hashem does for us what we do for others.  When Avraham forgave Avimelech and dovened for him to be able to have children, Hashem responded by giving a child to Avraham and Sarah.  That’s the reward for granting forgiveness.  What happens when you don’t?
Interestingly, the gemara (Baba Kama 92a) and the midrash (Bamidbar Rabba 19:23) don’t describe what happens to you when you refuse to forgive.  They describe what you become when you refuse to forgive.  The term they use is “achzari,” you become a cruel person.  When your feelings of anger at what happened and fear that it’ll happen again result in your refusing to forgive, you become a person who is cruel.  When instead, you overcome your anger and your fear and you forgive the person who hurt you, you become humble, and worthy of bracha.
It takes practice.  Maybe that’s why we practice it every night.  
Here are the first words in the section of the siddur called krias Shema al ha-mitah:
Master of the universe, I hereby pardon anyone who angered or antagonized me or who sinned against me — whether against my body, my property, my honor or against anything of mine; whether he did so accidentally, willfully, carelessly, or purposely; whether through speech, deed, thought, or notion.  I forgive them.  May no one be punished because of me.
Once we’ve sincerely forgiven those who have sinned against us, we are worthy of saying the next part:
May it will be Your will, HASHEM, my G-d and the G-d of my forefathers, that I sin no more. Whatever sins I have done before You may You blot out in Your abundant mercies, but not through suffering or bad illnesses. May the expressions of my mouth and the thoughts of my heart find favor before You, HASHEM, my Rock and my Redeemer.

Rabbi Yitzchak Shmuel Ackerman is a Licensed Mental Health Counselor with specialties in marriage, relationships, and parenting.  He works with parents and educators, and conducts parenting seminars for shuls and organizations.  He can be reached at 718-344-6575.