Question: If a man or woman dies and he/she was a disbeliever, is it allowed that we say:
إن لله وإنا إليه راجعون
We belong to Allah and to him we shall return
or is it not allowed? Also is it allowed that we say:
يا أيتها النفْس الْمطْمئنة ارْجعي إلى ربك راضية مرْضية
(It will be said to the pious): “O (you) the one in (complete) rest and satisfaction!
“Come back to your Lord, Well-pleased (yourself) and well-pleasing unto Him! [Al-Fajr: 27:28]
until the end [of the surah]?
Answer: There is no harm to say If a disbeliever dies, “we belong to Allah and to him we shall return” if a disbeliever dies. Allah praise is due to Allah. If he is from your relatives then there is no harm. All people will return to Allah. All people are the property of Allah ta’la, so there is no harm in this.
However, he does not supplicate for him as long as he is a disbeliever. He does not supplicate for him. He does not say: “(It will be said to the pious): O (you) the one in (complete) rest and satisfaction Come back to your Lord,” [Al-Fajr: 27:28] because this soul is not in complete rest and satisfaction. It is an evil soul. This is not said for it. This is only said for a believer.
So in short, if a disbeliever dies there is no problem to say:”we belong to Allah and to him we shall return”. There is no problem that it is said to you other than that: “may Allah magnify you reward in it and make good your consolation“, there is no problem[as a condolence]: “he is for you a benefit in his life“, “there is in his life a benefit for you” so no problem. However, he does not supplicate for him, seek forgiveness for him, and give charity for him if he died a disbeliever”..
[Taken from here: https://www.binbaz.org.sa/mat/18152 ]
Translated by
Faisal ibn Abdul Qaadir ibn Hassan
Abu Sulaymaan