Sunan Ibn Majah, Book 6, Hadith 1518 (In-Book)

It was narrated from ‘Aishah that the Messenger of Allah entered upon her and there was a close relative of hers who was in the throes of death. When the Prophet saw how upset she was, he said: “Do not grieve for your relative, for that is part of his Hasanat (merits).”

حَدَّثَنَا هِشَامُ بْنُ عَمَّارٍ، حَدَّثَنَا الْوَلِيدُ بْنُ مُسْلِمٍ، حَدَّثَنَا الأَوْزَاعِيُّ، عَنْ عَطَاءٍ، عَنْ عَائِشَةَ، أَنَّ رَسُولَ اللَّهِ ـ صلى الله عليه وسلم ـ دَخَلَ عَلَيْهَا وَعِنْدَهَا حَمِيمٌ لَهَا يَخْنُقُهُ الْمَوْتُ فَلَمَّا رَأَى النَّبِيُّ ـ صلى الله عليه وسلم ـ مَا بِهَا قَالَ لَهَا ‏ "‏ لاَ تَبْتَئِسِي عَلَى حَمِيمِكِ فَإِنَّ ذَلِكَ مِنْ حَسَنَاتِهِ ‏" ‏ ‏.‏

sunnah.com