The Prophet ﷺ used to seek refuge with these words, "Remove the affliction, Lord of mankind, and grant healing, for You are the Healer. There is no cure except Your cure, a cure that leaves no illness behind."When the Prophet ﷺ grew gravely ill during the sickness in which he died, I took his hand and began to wipe him with it while reciting these words. He drew his hand away from mine and said, "O Allah, forgive me and join me with the highest company."She said, these were the last words I heard from him ﷺ.
حدثنا أبو بكر بن أبي شيبة حدثنا أبو معاوية عن الأعمش عن مسلم عن مسروق
كان النبي ﷺ يتعوذ بهؤلاء الكلمات أذهب الباس رب الناس واشف أنت الشافي لا شفاء إلا شفاؤك شفاء لا يغادر سقما فلما ثقل النبي ﷺ في مرضه الذي مات فيه أخذت بيده فجعلت أمسحه وأقولها فنزع يده من يدي ثم قال اللهم اغفر لي وألحقني بالرفيق الأعلى قالت فكان هذا آخر ما سمعت من كلامه ﷺ
Bukhari narrated it in the Book of Illness, Chapter on the Supplication of the One Visiting the Sick, hadith 5750, 5743, 5675, and Muslim in the Book of Greeting, Chapter on the Recommendation of Reciting Ruqyah for the Sick, hadith 2191, from the hadith of Abu Muawiya, from Amash, and others besides him, from the hadith of Muslim bin Abu Duha, and Ibrahim Nakhai followed him in narrating it.