"I heard the Messenger of Allah say: 'When you see the dead, say something good, for the angels say Amin to whatever you say; When Abu Salamah died, I said: 'O Messenger of Allah, what should I say?' He said: 'Say" Allahummaghfirlanaa wa lahu wa a 'qibni minhu 'uqbai hasanah (O Allah, forgive us and him, and compensate me well for this loss.)"' Then Allah, the Mighty and Sublime, compensated me with Muhammad." (Using translation from Nasāʾī 1825)
سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ إِذَا حَضَرْتُمُ الْمَرِيضَ فَقُولُوا خَيْرًا فَإِنَّ الْمَلَائِكَةَ يُؤَمِّنُونَ عَلَى مَا تَقُولُونَ فَلَمَّا مَاتَ أَبُو سَلَمَةَ قُلْتُ يَا رَسُولَ اللهِ كَيْفَ أَقُولُ؟ قَالَ قَوْلِي «اللهُمَّ اغْفِرْ لِي وَلَهُ وَأَعْقِبْنِي مِنْهُ عُقْبَى حَسَنَةً فَأَعْقَبَنِي اللهُ مِنْهُ مُحَمَّدًا ﷺ»