Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Allah عز وجل will say on the Day of Resurrection, 'Son of Adam, I fell ill and you did not visit Me.'The person will say, 'My Lord, how could I visit You when You are the Lord of the worlds?'Allah will say, 'Did you not know that My servant so-and-so was ill and you did not visit him? Did you not know that had you visited him, you would have found Me with him?Son of Adam, I asked you for food and you did not feed Me.'The person will say, 'My Lord, how could I feed You when You are the Lord of the worlds?'Allah will say, 'Did you not know that My servant so-and-so asked you for food and you did not feed him? Did you not know that had you fed him, you would have found that with Me?Son of Adam, I asked you for drink and you did not give Me to drink.'The person will say, 'My Lord, how could I give You drink when You are the Lord of the worlds?'Allah will say, 'My servant so-and-so asked you for drink and you did not give him to drink. Had you given him drink, you would have found that with Me.'"

Muslim 6556

Sahih

حدثني محمد بن حاتم بن ميمون حدثنا بهز حدثنا حماد بن سلمة عن ثابت عن أبي رافع

عن أبي هريرة قال

قال رسول الله ﷺ إن الله عز وجل يقول يوم القيامة يا ابن آدم مرضت فلم تعدني قال يا رب كيف أعودك وأنت رب العالمين قال أما علمت أن عبدي فلانا مرض فلم تعده أما علمت أنك لو عدته لوجدتني عنده يا ابن آدم استطعمتك فلم تطعمني قال يا رب وكيف أطعمك وأنت رب العالمين قال أما علمت أنه استطعمك عبدي فلان فلم تطعمه أما علمت أنك لو أطعمته لوجدت ذلك عندي يا ابن آدم استسقيتك فلم تسقني قال يا رب كيف أسقيك وأنت رب العالمين قال استسقاك عبدي فلان فلم تسقه أما إنك لو سقيته وجدت ذلك عندي

مسلم 6556صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Righteousness, maintaining ties, and good manners
Chapter
Virtue of visiting the sick
Numbering
Darussalam 6556
Muslim 6556