Praise be to Allah.
You have to restrain your anger, because Allah says (interpretation of the meaning):
“…who repress anger, and who pardon men; verily, Allah loves Al-Muhsinoon (the good‑doers).”
“And those who avoid the greater sins, and Al‑Fawahish (illegal sexual intercourse), and when they are angry, they forgive.”
This is because when a person does not restrain his anger, he insults, curses, swears and hits. Anger may be a door to all kinds of evil. The Prophet (peace and blessings of Allah be upon him) often advised people not to get angry. Al-Bukhari narrated in al-Saheeh from Abu Hurayrah (may Allah be pleased with him) that a man said to the Prophet (peace and blessings of Allah be upon him), “Advise me.” He said: “Do not get angry.” The man repeated his request several times, and he said, “Do not get angry.”
The Prophet (peace and blessings of Allah be upon him) regarded the one who controls himself when he is angry as being the strongest of men. Al-Bukhari narrated in al-Saheeh that the Messenger of Allah (peace and blessings of Allah be upon him) said: “The strong man is not the one who can wrestle (fight); the strong man is the one who controls himself at the time of anger.”
Al-Hafiz Ibn Hajar (may Allah have mercy on him) made some important points in Fath al-Bari in his commentary on the hadeeth (narration) “Do not get angry”. He said:
“Al-Tabarani quoted the hadeeth of Sufyan ibn ‘Abd-Allah al-Thaqafi: I said, O Messenger of Allah, tell me something that will be of benefit to me, and make it brief and concise. He said, “Do not get angry, and Paradise will be yours.” It was also narrated that Abu’l-Darda said: I said, O Messenger of Allah, tell me of a deed which will earn me admission to Paradise. He said, “Do not get angry…” Al-Khattabi said: The meaning of the phrase ‘Do not get angry’ is: Avoid the things that cause anger and do not expose yourself to that which provokes it. Anger itself could not have been forbidden, because it is something natural which cannot be removed from human nature. Someone else said: What is meant is that which can be achieved by training oneself… It was said that it means: Do not do that which anger provokes you to do.
Ibn Battal said: The hadeeth indicates… that striving to control oneself is more difficult than striving against the enemy, because the Prophet (peace and blessings of Allah be upon him) described the one who controls himself at times of anger as being the strongest of people. Someone else said: Perhaps the person who asked this question was hot-tempered; the Prophet (peace and blessings of Allah be upon him) used to command each person to do that which was most appropriate for him, so he summed up his advice to this person by telling him not to get angry. Ibn al-Teen said: in the words ‘Do not get angry’, the Prophet (peace and blessings of Allah be upon him) brought together the good of this world and of the Hereafter, because anger results in cutting off ties and withholding kindness, and it may lead to one doing harm to the person with whom one is angry, which diminishes one’s religious commitment.
One of the scholars said: Allah created anger from fire, and made it an instinct in man. When there is a dispute, the flames of anger are fanned until a person’s face and eyes become red, because the skin reflects what is underneath it… Anger produces external and internal changes, such as a change in colour, trembling, uncontrolled actions and a change in appearance, such that if the angry person could see himself when he is angry, he would feel ashamed of his ugly appearance and the way his appearance has changed. All of this is what happens on the outside. The internal effects are even worse, because it generates hatred in the heart, envy (hasad) and all kinds of bad feelings. The most ugly effects of anger are the internal effects, and the external changes are the results of the internal changes. All of this has an effect on the body. The effect on the tongue is that it speaks words of slander and foul language which the wise person would feel ashamed of, and the angry person regrets them when he calms down. The effects of anger can also be seen in people’s actions, when they beat and kill others. If the angry person does not have the chance to do that, he turns his anger against himself, tearing his garments and slapping his cheeks; sometimes he may have a seizure, or fall unconscious, or break vessels, or hit someone who has not done anything wrong. Whoever thinks about these evil actions will realize just how much wisdom there is in these gentle words of the Prophet (peace and blessings of Allah be upon him), ‘Do not get angry,’ and to how great an extent they protect people’s interests by warding off this great evil which may otherwise lead who knows where.
All of this has to do with anger for the sake of worldly things, not anger for the sake of religious matters… (Anger for the sake of Allah is praiseworthy and recommended, such as anger when seeing evil actions). It helps a person not to get angry when he bears in mind what has been narrated concerning the virtues of restraining anger, and the warnings concerning the results of anger; he should also seek refuge with Allah from the Shaytan (devil)… and do wudhu (ablution)… And Allah knows best.”
Remember, too, that the Prophet (peace and blessings of Allah be upon him) was not a person who insulted or cursed others. It was reported in Saheeh al-Bukhari that Anas ibn Malik (may Allah be pleased with him) said: The Prophet (peace and blessings of Allah be upon him) was not a person who insulted people or used obscene language, and he did not curse people. If he wanted to rebuke anyone, he would say, “What is wrong with him? – may his forehead be rubbed with dust.”
You must repent to Allah for any curses and aggressive words that you have uttered, but there is no need to tell those whom you have cursed, so as not to provoke any evil actions. You can ask their forgiveness in a general way. With regard to the people whom you have prayed against, pray for good things for them, especially if you have been unfair to them in your prayers against them when they did not deserve such a thing. Ask Allah to be kind to you, for a person’s duas (supplications) may come back on him if he prays against someone who does not deserve them. You must keep your tongue busy with du’a and dhikr (remembrance of Allah), because this brings peace to the heart. “… Verily, in the remembrance of Allah do hearts find rest” [13:28 – interpretation of the meaning]. Keep away from using your tongue to hurt other people.
May Allah bless our Prophet Muhammad.