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

It wasnarrated that ‘Aishah said: “The Prophet (PBUH) used to seekrefuge using the following words: ‘Adhhibil-ba’s, Rabbin-nas,washfiAntash-shafi, la shifa’a illa shifa’uka, shifa’an layughadiru saqaman(Take away the affliction, O Lord of mankind, andgrant healing, forYou are the Healer and there is no healing thatleaves no sickness).’When the Prophet (PBUH) fell sick with thesickness that would be hislast, I took his hand and wiped it overhis body and recited thesewords. He withdrew his hand from mine andsaid: ‘O Allah, forgive meand let me meet the exalted companions(i.e., those who occupy highpositions in Paradise).’ Those werethe last words of his that Iheard.” Translation Not Available

Book Ref: Sunan Ibn Majah Book 6 Hadith 1619
Web Ref:  Sunan Ibn Majah Vol 1 Book 6 Hadith 1619