Mishkat al-Masabih
Mishkat al-Masabih 1605
Arabic hadith text
وَعَنْ جَابِرٍ قَالَ: سَمِعْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَبْلَ مَوْتِهِ بِثَلَاثَةِ أَيَّامٍ يَقُولُ: «لَا يَمُوتَنَّ أَحَدُكُمْ إِلَّا وَهُوَ يُحْسِنُ الظَّنَّ بِاللَّه» . رَوَاهُ مُسلم
Translation
Jabir reported: Three days before his death, I heard the Messenger of Allah, peace and blessings be upon him, say, "None of you should die except while thinking well of Allah." Muslim transmitted it.