The Messenger of Allah ﷺ: When you attend dying man, you should say good words, for the angels say Amin to what you say. When Abu Salamah died, I said: What should I say, Messenger of Allah? He said: O Allah forgive him, and give us something good in exchange. She said: So Allah gave me Muhammad ﷺ in exchange for him. (Using translation from Abū Dāʾūd 3115)
سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ «إِذَا حَضَرْتُمُ الْمَرِيضَ فَقُولُوا خَيْرًا فَإِنَّ الْمَلَائِكَةَ يُؤَمِّنُونَ» فَلَمَّا مَاتَ أَبُو سَلَمَةَ قُلْتُ يَا رَسُولَ اللهِ مَا أَقُولُ؟ قَالَ قُولِي اللهُمَّ اغْفِرْ لَنَا وَلَهُ وَأَعْقِبْنِي مِنْهُ عُقْبَى حَسَنَةً فَأَعْقَبَهَا مِنْهُ مُحَمَّدًا ﷺ