All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
Praising Allah (saying Alhamdulillah) and becoming glad upon the death of the enemies of Islam and the people of serious innovation is permissible, and it is a favor from Allah on His slaves and on the plants and animals. Indeed, the Prophet was glad upon the killing of Abu Jahl and Ka‘b ibn Al-Ashraf, as they played a notorious role in fighting against Islam and the Muslims.
Ibn Sa'd narrated in his book At-Tabaqaat, “Abdul Hameed ibn Abdur-Rahmaan Al-Himmaani reported to us from Abu Haneefah, from Hammaad, who said, 'I gave the good news of the death of Al-Hajjaaj to Ibraaheem An-Nakhai, so he prostrated to Allah, and I saw him weeping with joy.”
Besides, Al-Khallaal said in As-Sunnah, “Abu Abdullah – i.e. Imaam Ahmad ibn Hanbal – was asked, ‘A man rejoices when he hears about the calamities that befell the people of Ibn Abu Du'aad (a notorious advocate of Mu'tazilite doctrines); is he sinful for this?’ He replied, ‘And who does not rejoice with that.’”
Allah knows best.