Allah Most High says:
Be forgiving, command righteousness, and sever yourselves from the ignorant ones (Qur’an 7:199)
The Messenger of Allah (Allah bless him and give him peace) said:
Do not feel malice toward one another (Bukhari, Muslim).
The Nature of Malice
This condition of malice (hiqd) that asserts itself in the state of anger when one lacks the power to take revenge. It is the seed of many evils. When anger has not been satisfied, its vapors engulf the heart, producing a seething effect that boils the heart. This vapor and sentiment plants the malice in the heart. This results in frustration. Malice is an intentional condition. It is not the feeling og mere dislike, which arises against your will. In malice, one entertains evil in the heart for another by design, and at the same time one is busy with schemes to harm the one at whom the malice is directed. If intention and desire to harm are absent, it will not be malice, but will be known as dejection (inqibad), which is not a sinful state as this state is natural condition.
The Messenger of Allah (Allah bless him and give him peace) said that “two persons harboring malice for one another are not forgiven” (Muslim). The reference to this malice is malice based on injustice and wrong. Hatred for the sake of religion is not within the scope of malice described here. Such hatred is meritorious, since hadiths command that love be for the sake of Allah and hatred be for the sake of Allah (Ahmed).
The cure for malice is to overlook the fault of the one toward whom malice is felt and to associate with him irrespective of the difficulty one may experience in the adoption of such kindhearted attitude.
(The Path to Perfection, Shaykh Maseehullah Khan)