“Be angry but do not sin; do not let the sun set on your anger”
From the catechisms
Anger - Revenge - Hatred (2302-2303)
Jesus denounced murderous anger and hatred. When anger is a desire for revenge, it is illicit. However, restitution can be imposed “to correct vices and to maintain order” (St. Thomas Aquinas). Anger is grave when it becomes a desire to kill or seriously wound another. “Anyone who is angry with his brother, shall be liable to judgment” (Mt 5:22).
Hatred is sinful when the person deliberately wills harm to another. The sin is grave when the person desires grave harm. “Love your enemies and pray for those who persecute you” (Mt 5:44).
Biblical Directive (2261-2262)
Scripture specifically says: “Do not slay the innocent and the righteous” (Ex 23:7). The deliberate murder of an innocent person is gravely contrary to man’s dignity, to the golden rule and to the holiness of God. This law is universally valid, obliging everyone at all times and all places.
In his Sermon on the Mount, Jesus went further. He prohibited anger, hatred and vengeance. Later, he asked his disciples to love their enemies. In his Passion, he did not defend himself and he told Peter to put away his sword.
The Seven Capital Sins (1866)
Some sins are called “capital” (according to St. John Cassian and St. Gregory) because they engender other sins. The seven capital sins are pride, avarice, envy, wrath, lust, gluttony, and sloth.
[wrath = anger]
Passions To Good And Evil (1767-1768)
Passions in themselves are neither good nor evil. They become good or evil as they lead the reason and the will to make a choice. Passions become voluntary when the will commands them or places no obstacle to them. “Moral goodness exists when passions are governed by reason” (St. Thomas Aquinas).
Strong feelings do not decide morality. They are only the inexhaustible reservoir of images and affections. Feelings are good when contributing to good acts. They are evil when leading to evil acts. These feelings can be lifted up by virtues or perverted by vices.