"O my Allah, … bring a curse upon Ubaydullah son of Ziyaad, ibna Marjanah, Umar son of Saad, and Shimr, and on the descendants of Abu Sufyaan, on the descendants of Ziyaad, on the descendants of Marwaan, till the Day of judgment."
While I was reading the above passage of Ziarat Ashura, a question came to my mind as to why we curse someone who is dead. Is it not malevolent to pray that someone be deprived of God's mercy, one who is no longer alive in this world? Is it not in disagreement with God's being a "Mercy for the worlds"? We believe the Imams liked their enemies even the ones whom they fought against. They were interested in their destiny and, before they started a battle, they always called on them to come to the right path. That is to say, the Imams wanted to bring them close to divine mercy. In fact, we do not abhor people; rather we abhor and disavow their evil acts and conducts. The question is: Why do we curse someone who is dead? And why do we pray to Allah to let His everlasting curse be on him?
Yazid and his likes were cursed by God, the Exalted, the Prophet (pbuh) and his noble successors (a.s.) who are the embodiments of divine mercy towards the rest of God's creatures.
Some people are disobedient and they, despite knowing the divine religion and divine punishments for sinning, not only violate their own rights but also those of Allah and other people. By so doing, they make themselves deserve damnation, curse and punishment in this world and in the hereafter.
Therefore, damning the accursed ones which is also an act of God, the Prophet and the Imams (a.s.) originate in the evil and wicked acts of the accursed ones. They have committed so many great sins and submerged themselves in evil so much that they deserve everlasting punishments. The breeze of divine mercy, as per the teachings of the Quran and the Ahlul-Bait, will blow on those who put themselves in its direction. That is why, the Quran makes mention of those who are doomed to eternal punishment in Hell.
God, the Exalted, Who is the source of mercy and blessing, has condemned and cursed many people in the Quran. They include people who hurt God and His messenger. The hypocrites and pagans, male or female, and those who conceal the clear signs of Allah, the Jews who believed that Allah's hand is tied up and those who accuse chaste and faithful women of evil acts have been cursed by God, the Glorified.
All of these indicate that some people, given that they are free, commit so many evil acts that they make themselves entitled to divine punishment. The breeze of divine mercy, as per the teachings of the Quran, the Prophet (pbuh) and the Ahlul-Bait, will blow on those who put themselves in its direction. The Quran speaks of those who are doomed to eternal punishment in Hell.
If an order (commandment) comes from God, or the Prophet and Imams (a.s.) to curse a certain group of people, we conclude that they are people who have closed all the ways of divine mercy to themselves; they are the ones who are submerged in sins and defiance of God to the extent that there is no hope left for their salvation. Although Imam Ali (a.s.) and Imam Hussein, as you have rightly mentioned, guided every individual to the truth, they would deal with them in the severest manner, if they did not accept it. Basically, why should not one speak of an oppressor and curse him on account of his evil deeds?
The case of people like Abu Lahab is still open even now after more than one thousand years. The Quran says: "Perdition overtake both hands of Abu Lahab, and he will perish!"
Dissociating and detaching oneself from the enemies of God and the Ahlul-Bait (a.s.) is one of the basic commandments of the Shi'a religion. Loving the friends of Allah and the Ahlul-Bait (a.s) would be meaningful only when one detaches himself of their enemies. According to some traditions, cursing the enemies of God and Ahlul-Bait (a.s.) have been given preference over extending greetings to Ahlul-Bait (a.s.).
Definitely, we do not hate the faithful people who sometimes commit an offense; rather, we detest their actions and deeds. What about the people who despite knowing the truth commit great sins like killing the prophets and imams?
It has been narrated from Imam Kazem (a.s.) that he said: "Detest the deeds of our friends who commit offense, and detest not them themselves."
However, those who committed injustice to the Imams who had come to help people by guiding them to the right path and bringing them close to divine mercy and those who denied the Imams their rights and shed their blood depriving mankind of their guidance and blessing made themselves entitled to the everlasting curse and damnation of God, the prophets and Imams (a.s.). They are doomed to eternal punishment because of their crime to deprive mankind of the light of guidance.
 - Ahzaab: 57; Fath, 6; Baqara 159: Maedah, 64; Noor, 23.
 - Ahzaab, 65.
 - Masadd: 1
 - Najafi, Razai, Abul Hasan, bin Muhammad, Majma' al-Noorayn wa Multaqa al-Bahrain, pg.234, Aal-e Aba Publication, Qom.
 - قَالَ قُلْتُ لِأَبِی الْحَسَنِ مُوسَى ع الرَّجُلُ مِنْ مَوَالِیکُمْ یَکُونُ عَارِفاً یَشْرَبُ الْخَمْرَ وَ یَرْتَکِبُ الْمُوبِقَ مِنَ الذَّنْبِ نَتَبَرَّأُ مِنْهُ فَقَالَ تَبَرَّءُوا مِنْ فِعْلِهِ وَ لَا تَتَبَرَّءُوا مِنْهُ أَحِبُّوهُ وَ أَبْغِضُوا عَمَلَهُ قُلْتُ فَیَسَعُنَا أَنْ نَقُولَ فَاسِقٌ فَاجِرٌ فَقَالَ لَا الْفَاسِقُ الْفَاجِرُ الْکَافِرُ الْجَاحِدُ لَنَا النَّاصِبُ لِأَوْلِیَائِنَا أَبَى اللَّهُ أَنْ یَکُونَ وَلِیُّنَا فَاجِراً وَ إِنْ عَمِلَ مَا عَمِلَ وَ لَکِنَّکُمْ تَقُولُونَ فَاسِقُ الْعَمَلِ فَاجِرُ الْعَمَلِ مُؤْمِنُ النَّفْسِ خَبِیثُ الْفِعْلِ طِیبُ الرُّوحِ وَ الْبَدَنِ الْخَبَرَ . Mustadrak al-Wasail, vol.12, pg.237