Usama bin Zayd reported,

The Prophet ﷺ said to one of his daughters when her son was dying, "To Allah belongs what He takes and to Him belongs what He gives, and everything with Him has an appointed term. So let her be patient and seek the reward."

Azami 3542

Sahih

عن أسامة بن زيد قال

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

الأعظمي 3542صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Dying person
Section
Offering condolences
Numbering
Jami al-Kamil 3542 (2nd edition)
Azami 3542