If his family are Muslim, there is nothing wrong with offering condolences to them, because they are Muslims who have been afflicted with calamity, and they have the right to be consoled.
But if they are disbelievers, then we should see whether that serves an interest. If that serves the interest of softening their hearts and creating affection in these disbelievers for the Muslims, there is nothing wrong with that. But if there is no benefit in doing that, then there is no point in doing it. End quote.
Shaykh Ibn `Uthaymin (may Allah have mercy on him.
Al-Ijabat `ala As’ilah al-Jaliyat, 1/14, 15.