“The Messenger of Allah ﷺ said: ‘When you visit one who is sick or dying, say good things, for the angels say: Amin to whatever you say.’ When Abu Salamah died, I came to the Prophet ﷺ and said: ‘O Messenger of Allah! Abu Salamah has died.’ He said: ‘Say: “Allahummaghfir li wa lahu, wa a’qibni minhu ‘uqba hasanah (O Allah, forgive me and him, and compensate me with someone better than him).’” She said: ‘I said that, and Allah compensated me with someone better than him: Muhammad the Messenger of Allah ﷺ.’” (Using translation from Ibn Mājah 1447)
قَالَ رَسُولُ اللهِ ﷺ «إِذَا حَضَرْتُمُ الْمَرِيضَ أَوِ الْمَيِّتَ فَقُولُوا خَيْرًا فَإِنَّ الْمَلَائِكَةَ يُؤَمِّنُونَ عَلَى مَا تَقُولُونَ» قَالَتْ فَلَمَّا مَاتَ أَبُو سَلَمَةَ أَتَيْتُ النَّبِيَّ ﷺ فَقُلْتُ يَا رَسُولَ اللهِ إِنَّ أَبَا سَلَمَةَ قَدْ مَاتَ فَقَالَ «قُولِي اللهُمَّ اغْفِرْ لِي وَلَهُ وَأَعْقِبْنِي مِنْهُ عُقْبَى حَسَنَةً» فَفَعَلْتُ فَأَعْقَبَنِي اللهُ مَنْ هُوَ خَيْرٌ مِنْهُ مُحَمَّدًا ﷺ