On what is said in the presence of a dead person

Riyad as-Salihin (The Meadows of the Righteous)

by Imam Nawawi

152. Chapter: On what is said in the presence of a dead person

920. Umm Salama said, "The Messenger of Allah, may Allah bless him and grant him peace, said, 'When you are with a sick person or dead person, speak well. The angels say 'Amen' to what you say.'" She said, "When Abu Salama died, I went to the Prophet, may Allah bless him and grant him peace, and said, 'Messenger of Allah, Abu Salama has died.' He said, 'Say: "O Allah, forgive me and him, and give me a good replacement for him."' I said, 'Allah gave me instead one who was better for me than him - Muhammad, may Allah bless him and grant him peace.'" [Muslim]

Muslim related "When you are with a sick person or a dead person" with uncertainty. Abu Dawud and others related it with "dead person" without uncertainty.

921. Umm Salama said, "I heard the Messenger of Allah, may Allah bless him and grant him peace, say, 'There is no slave who is afflicted by a calamity and then says, 'We belong to Allah and to Him we return. O Allah, give me a reward for my calamity and give me something better to replace it,' without Allah Almighty rewarding him for his affliction and granting him something better in its place.'" She said, "Abu Salama died and I said as the Messenger of Allah commanded me, and Allah did give me something better in his place - the Messenger of Allah." [Muslim]

922. Abu Musa reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "When His slave's child dies, Allah Almighty says to His angels, 'You have taken the child of My slave?' They say, 'Yes.' He says, 'You took the darling of his heart?' They say, 'Yes.' He says, 'What did My slave say?' They say, 'He praised Allah and said, "To Allah we return."' Allah Almighty says, 'Build My slave a house in the Garden and call it the House of Praise.'" [at-Tirmidhi]

923. Abu Hurayra reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "Allah Almighty says, 'The Garden is the reward for My believing slave when I take his best friend among the people of this world and he hopes to be rewarded for it." [al-Bukhari]

924. Usama ibn Zayd said, "One of the daughters of the Prophet, may Allah bless him and grant him peace, sent a message to him informing him that one of her children - or sons - was dying. He said to the messenger, 'Return to her and inform her that what Allah takes is His and what He gives is His. Everything has a fixed term with Him, so she should show fortitude and expect a reward.'" [Agreed upon]