I have seen some queries on the net saying “what dua to say on the death of a kafir?”
Hate to not get to the dua straight away, but Muslims MUST NOTE that firstly they must be aware of the status of the kafir. (Read this post to understand more about this topic)
When Islamic books of fiqh talk about various interactions with kafirs, they always specify the status of the kafir relative to Muslims. In case the status is not specified, unless otherwise stated, when fiqh books talk about “kafir”, they refer to “DHIMMIS”.
This is a VERY pertinent point of USUL, that Muslim-pretending munafiq scholars of these times deliberately ignore or jahil mufti-pretenders are unaware of. (Hanafis see Bahr Ar-Raiq and similar books that unless otherwise specified, when a fiqh book mentions a “kafir” it is referring to “DHIMMI”; Shafi’iys see Rawdzat At-Talibin and others, more on this later.)
In Islam, it is ONLY permitted to treat DHIMMIS who dutifully pay jizyah to the Islamic state – with softness, as long as they do not rebel against the state – without considering them at par to Muslim brothers and sisters. The example I always use – think of a rich millionaire sparing some loose change to a homeless guy.
The kafirs of these times are NOT DHIMMIS, as jizyah is not charged anywhere in the world.
The kafir states are of course kafir states that are not ruled by Islam, and the kuffaar there are only at a lower status than dhimmi. They are ALL HARBIYYEEN, regardless whether they have a treaty of no armed hostilities or are at war with any Islamic state. (See the above mentioned older post to read more)
As the Quran says:
Translation of meaning: If some good meets you, it grieves them, and if some illfortune meets you, they rejoice in it… [Holy Quran 3:120]
Translation of meaning: If some good meets you [O beloved Prophet], it grieves them… [Holy Quran 9:50]
With that established, it is proven from many ahadith that this is what the Prophet ﷺ said at the death of abu jahl, and based on it, the various fiqh scholars and Sufi masters of Islam state that this is what one should say when he hears of the death of a harbiy kafir, and ALL kafirs in these times are harbiyyeen:
الْحَمْدُ لِلَّهِ الَّذِي نَصَرَ عَبْدَهُ ، وَأَعَزَّ دِينَهُ
مسند أحمد بن حنبل
Translation of meaning: All praise is due to Allah, The One who helped His slave, and uplifted His religion. [Musnad Ahmad ibn Hanbal]
Please also note that regardless whether a kafir is harbiy or dhimmi, it is KUFR and DIRECT WAR against the Quran to pray for the dead kafir’s forgiveness, or for Allah to admit him to paradise, or for Allah to reward his surviving kafir relatives as there is no deed of a kafir that is rewarded. (See this post for citations of Quranic verses and rulings of scholars on this topic.)
As for dhimmis – it is permitted to be soft in a worldly mannerism to the dead dhimmi kafir’s next of kin dhimmi kafirs WITHOUT praying for the forgiveness of the dead dhimmi kafir or asking Allah to admit him into paradise AND WITHOUT asking Allah to reward the next of kin dhimmi kafirs, as no deeds of a kafir are reward-able according to the Quran’s explicit verses. But do note that there are no dhimmis in today’s world.
w-Allahu waliyyut tawfeeq.