(א) וַיֵּרָ֤א אֵלָיו֙ ה' בְּאֵלֹנֵ֖י מַמְרֵ֑א וְה֛וּא יֹשֵׁ֥ב פֶּֽתַח־הָאֹ֖הֶל כְּחֹ֥ם הַיּֽוֹם׃
(א) וירא אליו לְבַקֵר אֶת הֵחוֹלֶה אָמַר רַבָּי חָמָא בַּר חַנִינָא, יוֹם שְׁלִישִׁי לְמִילָתוֹ הָיָה, וּבָא הַקָּבָּ"ה וְשָׁאַל בִּשְׁלוֹמוֹ (בבא מציעא פ"ו):
(1) וירא אליו AND THE LORD APPEARED UNTO HIM to visit the sick man. R. Hama the son of Hanina said: it was the third day after his circumcision and the Holy One, blessed be He, came and enquired after the state of his health (Bava Metzia 86b)
(בראשית יח, א) וירא אליו ה' באלוני ממרא והוא יושב פתח האוהל כחום היום מאי כחום היום אמר רבי חמא בר' חנינא אותו היום יום שלישי של מילה של אברהם היה ובא הקב"ה לשאול באברהם הוציא הקב"ה חמה מנרתיקה כדי שלא יטריח אותו צדיק באורחים
§ The Gemara expounds another verse involving Abraham: “And the Lord appeared to him by the terebinths of Mamre, as he sat in the tent door in the heat of the day” (Genesis 18:1). The Gemara asks: What is the meaning of “the heat of the day”? Rabbi Ḥama, son of Rabbi Ḥanina, says: That day was the third day after Abraham’s circumcision, and the Holy One, Blessed be He, came to inquire about the well-being of Abraham. The Holy One, Blessed be He, removed the sun from its sheath in order not to bother that righteous one with guests, i.e., God made it extremely hot that day to allow Abraham to recover from his circumcision, as he would not be troubled by passing travelers whom he would invite into his tent.
(יח) לֹֽא־תִקֹּ֤ם וְלֹֽא־תִטֹּר֙ אֶת־בְּנֵ֣י עַמֶּ֔ךָ וְאָֽהַבְתָּ֥ לְרֵעֲךָ֖ כָּמ֑וֹךָ אֲנִ֖י ה'
(18) You shall not take vengeance or bear a grudge against your countrymen. Love your fellow as yourself: I am the LORD.
ואמר רבי חמא ברבי חנינא מאי דכתיב (דברים יג, ה) "אחרי ה' אלקיכם תלכו" וכי אפשר לו לאדם להלך אחר שכינה והלא כבר נאמר (דברים ד, כד) "כי ה' אלקיך אש אוכלה הוא"
And Rabbi Ḥama, son of Rabbi Ḥanina, says: What is the meaning of that which is written: “After the Lord your God shall you walk, and Him shall you fear, and His commandments shall you keep, and unto His voice shall you hearken, and Him shall you serve, and unto Him shall you cleave” (Deuteronomy 13:5)? But is it actually possible for a person to follow the Divine Presence? But hasn’t it already been stated: “For the Lord your God is a devouring fire, a jealous God” (Deuteronomy 4:24), and one cannot approach fire.
אלא להלך אחר מדותיו של הקב"ה מה הוא מלביש ערומים דכתיב (בראשית ג, כא) "ויעש ה' אלקים לאדם ולאשתו כתנות עור וילבישם" אף אתה הלבש ערומים הקב"ה ביקר חולים דכתיב (בראשית יח, א) "וירא אליו ה' באלוני ממרא" אף אתה בקר חולים הקב"ה ניחם אבלים דכתיב (בראשית כה, יא) "ויהי אחרי מות אברהם ויברך אלקים את יצחק בנו" אף אתה נחם אבלים הקב"ה קבר מתים דכתיב (דברים לד, ו) "ויקבר אותו בגיא" אף אתה קבור מתים
He explains: Rather, the meaning is that one should follow the attributes of the Holy One, Blessed be He. He provides several examples. Just as He clothes the naked, as it is written: “And the Lord God made for Adam and for his wife garments of skin, and clothed them” (Genesis 3:21), so too, should you clothe the naked. Just as the Holy One, Blessed be He, visits the sick, as it is written with regard to God’s appearing to Abraham following his circumcision: “And the Lord appeared unto him by the terebinths of Mamre” (Genesis 18:1), so too, should you visit the sick. Just as the Holy One, Blessed be He, consoles mourners, as it is written: “And it came to pass after the death of Abraham, that God blessed Isaac his son” (Genesis 25:11), so too, should you console mourners. Just as the Holy One, Blessed be He, buried the dead, as it is written: “And he was buried in the valley in the land of Moab” (Deuteronomy 34:6), so too, should you bury the dead.
תניא ביקור חולים אין לה שיעור. מאי אין לה שיעור סבר רב יוסף למימר אין שיעור למתן שכרה
It is taught in a baraita: The mitzva of visiting the ill has no fixed measure. The Gemara asks: What is the meaning of: Has no fixed measure? Rav Yosef thought to say: There is no fixed measure for the granting of its reward.
רב חלבו באיש לא איכא דקא אתי אמר להו לא כך היה מעשה בתלמיד אחד מתלמידי ר' עקיבא? שחלה, לא נכנסו חכמים לבקרו, ונכנס ר' עקיבא לבקרו ובשביל שכיבדו וריבצו לפניו, חיה. א"ל רבי החייתני. יצא ר' עקיבא ודרש כל מי שאין מבקר חולים כאילו שופך דמים
Rav Ḥelbo fell ill. There was no one who came to visit him. Rav Kahana said to the Sages: Didn’t the incident involving one of the students of Rabbi Akiva who became sick transpire in that manner? In that case, the Sages did not enter to visit him, and Rabbi Akiva entered to visit him and instructed his students to care for him. And since he swept and sprinkled water on the dirt floor before the sick student, he recovered. The student said to Rabbi Akiva: My teacher, you revived me. Rabbi Akiva went out and taught: With regard to anyone who does not visit the ill, it is as though he is spilling blood
כי אתא רב דימי אמר כל המבקר את החולה גורם לו שיחיה וכל שאינו מבקר את החולה גורם לו שימות, מאי גרמא? אילימא כל המבקר את החולה מבקש עליו רחמים שיחיה וכל שאין מבקר את החולה מבקש עליו רחמים שימות שימות. סלקא דעתך אלא כל שאין מבקר חולה אין מבקש עליו רחמים לא שיחיה ולא שימות
When Rav Dimi came from Eretz Yisrael to Babylonia he said: Anyone who visits the ill causes that he will live, and anyone who does not visit the ill causes that he will die. The Gemara asks: In what way are his actions the cause of that result? If we say that anyone who visits the ill prays for mercy from God that he will live, and anyone who does not visit the ill prays for mercy that he will die, does it enter your mind that he would pray that the sick person will die? Rather, anyone who does not visit the ill does not pray for mercy for him, neither that he will live nor that he will die. Since he might have saved the sick person with prayers had he visited, his failure to visit is tantamount to causing his death.
(א) הלכות ביקור חולים ורפואה ונוטה למות
קוצר דברים לספר תורת האדם שחבר הרב הגדול הרמב"ן עם קצת דעות אחרות שאכניס בו ועל כל דבר ודבר אכתוב מסקנת א"א הרא"ש ז"ל ועל הסדר שסידר הרב חוץ מהדברים שכתבתי במקומות אחרים א"ר יצחק בריה דרב יהודה: לעולם יבקש אדם שלא יחלה שאם חלה אומרים לו הבא זכות ותפטר. וכיון שחלה האדם מצוה על כל אדם לבקרו שכן מצינו בהקב"ה שמבקר חולים כמו שדרשו בפסוק: ״וירא אליו ה' באלוני ממרא״ מלמד שבא אליו לבקר החולה וסמכוה אקרא והודעת להם את הדרך ילכו בה ומצוה גדולה היא לבקר שמתוך כך יבקש עליו רחמים ונמצא כאילו מחיה אותו וגם מתוך שרואהו מעיין בענינו אם יצטרך לשום דבר משתדל בו להמציאו לו ועושה שיכבדו וירבצו לפניו והקרובים נכנסין מיד לבקרו והרחוקים אחר ג' ימים והחברים כקרובים ואם קפץ עליו החולי אלו ואלו נכנסין מיד...
Laws of Visiting the those who are not well...
(ד) אֵין מְבַקְּרִין הַחוֹלֶה בְּג' שָׁעוֹת רִאשׁוֹנוֹת שֶׁל יוֹם, מִפְּנֵי שֶׁכָּל חוֹלֶה, מֵקֵל עָלָיו חָלְיוֹ בַּבֹּקֶר, וְלֹא יָחוּשׁ לְבַקֵּשׁ עָלָיו רַחֲמִים. וְלֹא בְּג' שָׁעוֹת אַחֲרוֹנוֹת שֶׁל יוֹם, שֶׁאָז מַכְבִּיד עָלָיו חָלְיוֹ, וְיִתְיָאֵשׁ מִלְּבַקֵּשׁ עָלָיו רַחֲמִים. רמ״א: וְכָל שֶׁבִּקֵּר וְלֹא בִּקֵּשׁ עָלָיו רַחֲמִים, לֹא קִיֵּם הַמִּצְוָה (בֵּית יוֹסֵף בְּשֵׁם הָרַמְבַּ''ן).
(4) One must not visit the sick during the first three hours of the day, — for every invalid's illness is alleviated in the morning and [consequently] one will not trouble himself to pray for him; and not during the last three hours of the day, — for then his illness grows worse and one will give up hope to pray for him. Rema: One who visited [a sick person] and did not pray for him has not fulfilled the religious duty [of visiting the sick].17B.Yos. citing Nachmanidies (in T.H.) — G.
3 Things that we are supposed to accomplish when doing Bikur Cholim:
1) Making the person feel good.
2) Provide physical support; bring the person a pillow, water, call them when you're on your way and bring them their favourite ice cream.
3) Davening for the sick person to feel better.
----------------------------------------------------------------------------------------------------------------------
Is the Mitzvah of Bikkur Cholim from the Torah or from the Rabbis?
?דאורייתא או דרבנן
(א) מִצְוַת עֲשֵׂה שֶׁל דִּבְרֵיהֶם לְבַקֵּר חוֹלִים. וּלְנַחֵם אֲבֵלִים. וּלְהוֹצִיא הַמֵּת. וּלְהַכְנִיס הַכַּלָּה. וּלְלַוּוֹת הָאוֹרְחִים. וּלְהִתְעַסֵּק בְּכָל צָרְכֵי הַקְּבוּרָה. לָשֵׂאת עַל הַכָּתֵף. וְלֵילֵךְ לְפָנָיו וְלִסְפֹּד וְלַחְפֹּר וְלִקְבֹּר. וְכֵן לְשַׂמֵּחַ הַכַּלָּה וְהֶחָתָן. וּלְסַעֲדָם בְּכָל צָרְכֵיהֶם. וְאֵלּוּ הֵן גְּמִילוּת חֲסָדִים שֶׁבְּגוּפוֹ שֶׁאֵין לָהֶם שִׁעוּר. אַף עַל פִּי שֶׁכָּל מִצְוֹת אֵלּוּ מִדִּבְרֵיהֶם הֲרֵי הֵן בִּכְלַל (ויקרא יט יח) "וְאָהַבְתָּ לְרֵעֲךָ כָּמוֹךָ". כָּל הַדְּבָרִים שֶׁאַתָּה רוֹצֶה שֶׁיַּעֲשׂוּ אוֹתָם לְךָ אֲחֵרִים. עֲשֵׂה אַתָּה אוֹתָן לְאָחִיךְ בְּתוֹרָה וּבְמִצְוֹת:
(1) It is a rabbinic positive precept to visit the sick, comfort the mourners, escort the dead, dower the bride, accompany the [departing] guests — — as well as to cheer the bride and the groom, and to assist them in whatever they need. Even though all these precepts are of rabbinic origin, they are implied in the biblical verse: "You shall love your neighbor as yourself" (Leviticus 19:18); that is, whatever you would have others do to you, do to your brothers in Torah and precepts.
ספר הלכות גדולות הקדמה עמוד טו - בה״ג
ואלו מצות קום עשה:
(א) קרית שמע. (ב) ותפילין. (ג) ומזוזה. (ד) ציצית. (ה) ומילה. (ו) פדיון הבן. (ז) ופדיון פטר חמור. (ח) והפרשת בכורות שור וכבש או עז. (ט) ופריה ורביה. (י) תרומה גדולה. (יא) ומעשר ראשון. (יב) תרומת מעשר. (יג) מעשר שני. (יד) ומעשר עני. (טו) ראשית הגז. (טז) והמתנות. (יז) חלה. (יח) בכורים. (יט) שקלים. (כ) עורות קדשים. (כא) והמורם תרומה מתודה. (כב) וחזה ושוק. (כג) וברכת המזון. (כד) ותלמוד תורה. (כה) מאה ברכות בכל יום. (כו) קידוש השם. (כז) ואהבת השם. (כח) ויראת השם. (כט) לעבד לשם. (ל) להשבע בשם. (לא) ולדבק בשם. (לב) וללכת בדרכיו. (לג) להלביש ערומים. (לד) לקבור מתים. (לה) לנחם אבלים. (לו) בקור חולים.
The picture above is from Yechave Da'at / יחוה דעת

This is a graphic illustration of the sources brought down in the shiur. The graphic is not EXACT, rather a rough estimate of the sources and their opinions.