When the Prophet ﷺ fell ill, I took his hand and began passing it over his chest, reciting these words, "Remove the harm, Lord of mankind." He withdrew his hand from mine and said, "I ask Allah for the highest, most blessed companionship."
قال حدثنا عفان حدثنا حماد عن حماد عن إبراهيم عن الأسود
لما مرض النبي ﷺ أخذت بيده فجعلت أمرها على صدره ودعوت بهذه الكلمات أذهب الباس رب الناس فانتزع يده من يدي وقال أسأل الله عز وجل الرفيق الأعلى الأسعد
Its chain of transmission is sahih. It has already appeared at 24772.