[Machine] I heard the Prophet ﷺ before his death say three things: None of you should die except while having good thoughts about Allah. The wording of their hadiths is similar.
سَمِعْتُ النَّبِيَّ ﷺ قَبْلَ مَوْتِهِ بِثَلَاثٍ يَقُولُ لَا يَمُوتَنَّ أَحَدٌ مِنْكُمْ إِلَّا وَهُوَ يُحْسِنُ الظَّنَّ بِاللهِ ﷻ لَفْظُ حَدِيثِهِمَا سَوَاءٌ