What advice can be found in Torah sources for what to do in cases of an epidemic or pandemic? Or what does the Torah say to prevent sickness, even if it weren't epidemic?
Bava Kamma 60b recommends quarantine.
ת"ר דבר בעיר כנס רגליך שנאמר ואתם לא תצאו איש מפתח ביתו עד בקר ואומר (ישעיהו כו, כ) לך עמי בא בחדריך וסגור דלתיך בעדך ואומר (דברים לב, כה) מחוץ תשכל חרב ומחדרים אימה
The Rabbis taught: A plague in the city - draw in your legs, as it says (Shemos 12:22), “And you, let no man go out from the entrance of his house until morning,” and it says (Yeshaya 26:20), “Go, my nation, come into your rooms and close the doors on your behalf,” and it says (Devarim 32:25), “Outside the swords will bereave, and in the chambers terror.”
The Gemara clarifies that the second verse is cited to include a plague during the day, and the third to include even if one is scared to remain indoors and feels it may be better to venture out. It cites similarly that Rava would close his windows during a plague.
Rav Avigdor Miller explained https://torasavigdor.org/rav-avigdor-miller-on-the-ebola-virus/
"...The first thing is that we should say, Mah zos asah elokim lanu? That’s number one. It didn’t just happen — Hashem made it happen. That’s the first thing to understand.
The next thing is, what’s the purpose that Hashem had in mind? Then you can start using your intelligence. Now, if those people were uncivilized people, so they deserved to get what they got. They deserve it. Hakodosh Boruch Hu visits upon the wicked certain penalties.
But that’s not all. The most important lessons in the world are for us. אין הקדוש ברוך הוא מביא פורענויות אלא בשביל ישראל – Any misfortune that comes to the world comes for us. Everything in the world is for us. And Rashi says that the purpose is that Yisroel should see and be afraid and that they should do teshuva.
What kind of teshuva should they do? You should be mispallel to Hashem and you Hashkivenu Hashem Elokeinu at maariv, and you should do teshuva for saying those words without kavana for so long. So do teshuva and say it with kavana. והסר ממנו אויב דבר – Dever! And חרב and רעב and יגון. You have to pray to Hashem to protect you. That’s the first teshuva – to pray to Hashem.
So when you’re davening ma’ariv tonight, immediately, that’s our first reaction. Now, there are many other things to do too – but whatever it is, the purpose of what happens in the world is only בשביל ישראל, for the sake of the Am Yisroel."
Aruch Hashulchan OC 576:12
כתבו הגדולים דכשאבעבועות שקורין פקי"ן פורחים בתינוקות ומתים – יש לגזור תענית. וכל אחד מחוייב להרחיק מן העיר בניו ובנותיו הקטנים, ואם לא עשה כן – הרי זה מתחייב בנפשם (מגן אברהם סעיף קטן ג בשם השל"ה). ובגמרא איתא: דבר בעיר – כנס רגליך (בבא קמא ס ב). אך האבעבועות הוי מחלה מתדבקת, ולכן החוב להרחיקם מן העיר.ועכשיו אין זה מצוי, כי זה כמאה וחמשים שנים המציאו הרופאים להעמיד לכל קטן וקטנה בני שנה או יותר קו"י פאקי"ן, ועל ידי זה נמלטים ממחלה זו כידוע. ועכשיו שכיחי בילדים מחלה שקורין דיפטערי"ט, והוא מין אסכרה שמחניק הגרון. ונראה לי שאם חלילה המחלה מתרבה בעיר – יש לגזור תענית.
Shemot 15:26 says
וַיֹּאמֶר֩ אִם־שָׁמ֨וֹעַ תִּשְׁמַ֜ע לְק֣וֹל ׀ יְהוָ֣ה אֱלֹהֶ֗יךָ וְהַיָּשָׁ֤ר בְּעֵינָיו֙ תַּעֲשֶׂ֔ה וְהַֽאֲזַנְתָּ֙ לְמִצְוֺתָ֔יו וְשָׁמַרְתָּ֖ כָּל־חֻקָּ֑יו כָּֽל־הַמַּֽחֲלָ֞ה אֲשֶׁר־שַׂ֤מְתִּי בְמִצְרַ֙יִם֙ לֹא־אָשִׂ֣ים עָלֶ֔יךָ כִּ֛י אֲנִ֥י יְהוָ֖ה רֹפְאֶֽךָ׃ (ס)
He said, “If you will heed the LORD your God diligently, doing what is upright in His sight, giving ear to His commandments and keeping all His laws, then I will not bring upon you any of the diseases that I brought upon the Egyptians, for I the LORD am your healer.” (Sefaria translation into English)
לא אשים עליך. וְאִם אָשִׂים הֲרֵי הוּא כְּלֹא הוּשְׂמָה, כי אני ה' רפאך – זֶהוּ מִדְרָשׁוֹ. וּלְפִי פְשׁוּטוֹ כִּי אֲנִי ה' רֹפְאֶךָ וּמְלַמֶּדְךָ תוֹרָה וּמִצְווֹת לְמַעַן תִּנָּצֵל מֵהֶם,
The Midrash says that if, for some reason, Hashem does place a disease on you, it will be as if it was not placed, because God is the doctor / healer. In other words, He will heal you quickly enough that it will seems as if it wasn't there.
The simple meaning is that practically, one must perform God's commandments in order that you shall be saved from acquiring the disease in the first place.
Rav Yisroel Reisman (Ki Sisa 5780) mentioned saying פיטום הקטורת to stem a pandemic.
This seems to be based on the Zohar quoted in Me'am Loez (Ki Sisa p.304) where Rav Acha told the city of Tarsha which suffered from a plague for seven consecutive days. He told them, "Choose from among you four men, the best among you; you must be certain that all of them are G-dfearing, I will be among them. We will go to the four corners of the city, in all four directions. Ten men will join us, going in each direction and then all of us with heart and soul shall say Pitum HaKetoreth and the section dealing with sacrifice. With G-d's help, this will stop the plague...they did this, said Pitum HaKetoreth three times, and the plague stopped."
Rav Simcha Bunim Cohen (Thursday night shiur 3/12) said to focus on saying berachos while standing or sitting (rather than doing other things).
I refer to the story related in the Talmud (Gittin 56b) when Hashem ordered a “yitush” creature, to invade the brain of the wicked Titus, after he had blasphemed against Hashem.
In our days too, mankind has blasphemed against Hashem, denying His existence or the need to follow the laws of the Torah. It’s possible that this is one of the reasons that Hashem unleashed a tiny organism, a virus, which modern mankind, with all its arrogance about the superior medical knowledge we think that we possess, is helpless in preventing its spread.
[Note, this is not intended to belittle the medical recommendations of modern medicine, such as quarantine and like. But the fact remains that all these recommendations are merely a form of "hishtadlus" by which we TRY to protect ourselves from catching the virus].
Developing a vaccine is a permitted endeavor, as the Torah allows us to seek appropriate medical treatment (Shemos 21:19, Bava Kamma 85a). There may also be justifiable pride in being able to make medical breakthroughs. However a step away from this “justifiable pride” is the arrogance of man, who thinks that modern medicine is all powerful, and that we can control our own destinies. If Hashem sends a virus, no worries, we’ll soon have a vaccine to take care of it. That attitude causes man to miss the message which Hashem is trying to send us by sending these illnesses.
אין לנו להישען אלא על אבינו שבשמים
Corona is related to the word "crown".
ויתנו לך כתר מלוכה.
Hashem's ultimate goal is that mankind should recognize His sovereignty. This should be a wake-up call, to recognize that Hashem is in charge of the world, and that all of mankind, Jews and non-Jews alike, must obey His rules, as spelled out in the Torah. If we heed His call, then hopefully, we will merit to be spared any unpleasant consequences.
The Gemara (Shabbos 108b-109a) is very strict about hygiene of one's hands when touching the face, the first line of defence the health community recommends.
הוא היה אומר יד לעין תיקצץ יד לחוטם תיקצץ יד לפה תיקצץ יד לאוזן תיקצץ יד לחסודה תיקצץ יד לאמה תיקצץ יד לפי טבעת תיקצץ יד לגיגית תיקצץ יד מסמא יד מחרשת יד מעלה פוליפוס תניא רבי נתן אומר בת חורין היא זו ומקפדת עד שירחוץ ידיו שלש פעמים
Apropos Rabbi Mona’s statement with regard to healing, the text cites what he would say about other matters that require special attention: A hand that touches the eye should be severed because it harms the eye. A hand that touches the nose should be severed. A hand that touches the mouth should be severed. A hand that touches the ear should be severed. A hand that touches one’s wound should be severed. A hand that touches one’s member should be severed, lest one arouse himself. A hand that touches one’s anus should be severed, lest one make himself ill. A hand that is placed into a barrel of beer should be severed because the beer will not ferment. A hand that frequently touches the eye causes blindness. A hand that frequently touches the ear causes deafness. A hand that touches the nose or mouth causes polyps [polypus]. It was taught in a baraita that Rabbi Natan says: She is a liberated entity, this evil spirit that rests on one’s hands before they are washed in the morning, and she refuses to leave until one washes his hands three times.
Even though Rashi explains this Gemara to be referring to washing one's hands in the morning to remove an evil spirit resulting from sleep, perhaps one could understand the passage to be referring to hands that are not sterile bringing infectious diseases into the body.
Even if that isn't the proper interpretation of the Gemara, it is at least a remez (hint) of the importance of washing one's hands.
Amazing. During animal sacrifices in the ancient temple times, the Bible lists special spices to be used when the animal is burned. Fairly recently, it had been thought that these spices functioned as a means to cover the bad odors. Today we know the biblical mandate required these spices as a means to overcome bacteria, viruses, and other microbes produced (flowing from the blood) when an animal is slaughtered and burned. The properties in the spices helped protect the person from diseases. This was shown to be true by modern scientific studies. Thus, had the Chinese cooked their animals more carefully, the way the Torah prescribed, it is possible that coronavirus could have been avoided altogether. In any event, it is now revealed that the Torah teaches divine preventative medicine.
All scientific findings can be found in chapter six of Dr. Michael Lebowitz’s book called “G-d’s Preventive Medicine.” For a good summary of the book see here.