-عن أم سلمة رضي الله عنها قالت‏:‏ قال رسول الله صلى الله عليه وسلم ‏:‏ ‏"‏إذا حضرتم المريض، أو الميت، فقولوا خيرا، فإن الملائكة يؤمنون علي ما تقولون، قالت‏:‏ فلما مات أبو سلمة، أتيت النبي صلى الله عليه وسلمى الله عليه وسلم الله عليه وسلم الله عليه وسلم فقلت‏:‏ يا رسول الله، إن أبا سلمة قد مات، قال‏:‏ “قولي‏:‏ اللهم اغفر لي وله، واعقبني منه عقبة حسنة‏"‏ فقلت‏:‏ فأعقبني الله من هو خير لي منه‏:‏ محمداً صلى الله عليه وسلم ‏.‏‏"‏ ((رواه مسلم هكَذا:"إِذا حَضَرْتُمُ المَرِيضَ" أَو"الميِّت"عَلَى الشَّكِّ، رواه أبو داود وغيره:"الميِّت"بلا شَكٍّ)).
Copy
Abu Musa Al-Ash'ari (May Allah be pleased with him) reported

The Messenger of Allah (ﷺ) said, "When a man's child dies, Allah, the Exalted, asks His angels, 'Have you taken out the life of the child of My slave?' and they reply in the affirmative. He (SWT) then asks, 'Have you taken the fruit of his heart?' and they reply in the affirmative. Thereupon He asks, 'What did my slave say?' They say: 'He praised You and said: Inna lillahi wa inna ilaihi raji'un (We belong to Allah and to Him we shall return).' Allah says: 'Build a house for my slave in Jannah and name it Baitul-Hamd (the House of Praise)."'[At-Tirmidhi].