Is there a specific formulation required for offering condolences (Ta'ziyah)?
General Chapter
Al-Mughni
Book of Funerals
Primary text
There is no prescribed, limited formula for offering condolences. The Prophet, peace be upon him, is reported to have consoled a man saying, 'May Allah have mercy on you and reward your patience' (Ajarak). Ahmad narrated this. Ahmad also consoled Abu Talib, standing at the door of the mosque, saying, 'May Allah increase your reward and perfect your condolence.'
Supporting text
Some of our companions recommended that when consoling a Muslim for the death of another Muslim, one should say, 'May Allah increase your reward, perfect your condolence, and have mercy on your deceased.' Some scholars favored saying what Ja'far ibn Muhammad narrated from his father, from his grandfather, reporting that upon the passing of the Prophet (peace be upon him), a speaker was heard saying, 'Indeed, in Allah is comfort from every affliction, replacement for every departed, and attainment for everything missed. So trust in Allah and hope in Him, for the afflicted is the one deprived of reward.' This was narrated by Al-Shafi'i in his Musnad.