Saadi Murriyah reported,

Umar passed by Talha after the death of the Messenger of Allah ﷺ and asked, "Why do I see you so downcast? Has your cousin's rule troubled you?"Talha replied, "No, but I heard the Messenger of Allah ﷺ say, 'I know a word which no one says at the moment of his death except that it becomes a light for his record, and his body and soul find comfort in it at the time of death.' But I did not ask him about it before he passed away."Umar said, "I know it. It is the one he wanted his uncle to say. Had he known of anything more saving for him than it, he would have commanded him to say it."

Azami 3497

Sahih

عن امه سعدي المرية، قالت

مر عمر بطلحة بعد وفاة رسول الله ﷺ فقال: ما لك كئيبا؟ أساءتك إمرة ابن عمك؟ قال: لا، ولكن سمعت رسول الله ﷺ يقول: إني لأعلم كلمة لا يقولها أحد عند موته إلا كانت نورا لصحيفته، وإن جسده وروحه ليجدان لها روحا عند الموت فلم أسأله حتى توفى. قال: أنا أعلمها، هي التي أراد عمه عليها، ولو علم أن شيئا أنجي له منها لأمره.

الأعظمي 3497صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Dying person
Section
Whoever's last words are "There is no god but Allah" will enter Paradise
Numbering
Jami al-Kamil 3497 (2nd edition)
Azami 3497