REGALIM CANCEL SHIVAH
Gemara
19a (Mishnah): If burial was three days before the Regel, the Regel cancels Shivah (the restrictions of the first seven days of mourning).
R. Eliezer says, after the Churban, Shavu'os is like Shabbos;
R. Gamliel says, Rosh Hashanah and Yom Kipur are like Regalim.
Chachamim say, Shavu'os is like Regalim, and Rosh Hashanah and Yom Kipur are like Shabbos.
19b (Rav Huna brei d'Rav Yehoshua, Rav Papa and Rav Papi): All agree that if the third day of Avelus was Erev ha'Regel, he may not bathe until evening.
20a (Beraisa - R. Eliezer): If one fulfilled turning over the bed three days before the Regel, he need not turn it over after the Regel.
Chachamim say, even if he turned it over one day or one moment (before the Regel, he is exempt after the Regel).
R. Elazar b'Rebbi Shimon says, R. Eliezer gives Beis Shamai's opinion, and Chachamim give Beis Hillel's opinion.
(Rav Huna citing R. Yochanan): Even one day or one moment (before the Regel suffices).
(Rava): The Halachah follows the Tana of our Mishnah, who requires three days before the Regel.
(Ravina): The Halachah is that even one day or one moment suffices.
24a (Rav Gidal citing Shmuel): The Halachah follows R. Gamliel (Rosh Hashanah and Yom Kipur are like Regalim).
(Rav Anani bar Sason and R. Yitzchak Nafcha): (If one was an Avel) one day before Shavu'os, with Shavu'os it is considered 14 days. (Even one day or one moment before the Regel suffices, and Shavu'os is considered a Regel.)
Rishonim
Rif and Rosh (3:25,26): R. Eliezer says that if one fulfilled turning over the bed three days before the Regel, he need not turn it over after the Regel. Chachamim say that even one day, or one moment before the Regel suffices. Ravina rules like this.
Nimukei Yosef (DH Masnisin): Our Tana requires three days before the Regel, because this is the primary Aveilus.
Rif and Rosh (26): All agree that if the third day of Avelus was Erev ha'Regel, he may not bathe until evening. The same applies if the sixth day was Erev ha'Regel. This is because Shivah was not finished, just the Regel interrupts. Therefore it is forbidden until the Regel enters.
Rosh (26): The Ra'avad says that regarding bathing we do not say that Miktzas ha'Yom k'Kulo, because it is possible to bathe at night (on Yom Tov). Shaving and laundering are forbidden on Yom Tov, so they are permitted during the day, but one may not wear the laundered clothes until dark. Some say that on Erev ha'Regel we permit shaving but forbid laundering, because laundering will be permitted after Shivah but shaving is forbidden all 30 days. (The Mordechai and others attribute this to Tosfos Rivam according to Riva.) The first opinion is better; even laundering is permitted. The Ramban agrees.
Hagahos Ashri: R. Tam says that he bathes at night in cold water. Ra'avan and R. Shmuel say that 'until evening' means after Tefilas Minchah, for then the consolers have left and Shivah is finished. Most Ge'onim forbid, but the custom is to be lenient.
Rif and Rosh (3:28): We hold that Shavu'os is like Regalim. This follows from Rav Anani. The Halachah follows R. Gamliel, who says that Rosh Hashanah and Yom Kipur are like Regalim.
Rosh (3:25,26): The Beraisa (20a) discusses turning over the bed one or three days before the Regel, unlike the Mishnah which discusses only how many days passed. The Ra'avad infers that if one did not fulfill the Mitzvah before the Regel, whether he was Shogeg or Mezid, the Regel does not cancel Shivah. This is so a sinner will not profit. Removing shoes is another Mitzvah that enables the Regel to cancel Shivah.
Rambam (Hilchos Evel 10:3): Aveilus does not apply during the Regalim, Rosh Hashanah or Yom Kipur. If one buried his Mes even a moment before one of them, Shivah is cancelled.
Rambam (6): If the sixth day of Avelus was Erev ha'Regel, and all the more so the fifth or third day, he may not shave. Only Shivah is Batel. He may not bathe, anoint or do Melachah until Yom Tov; Yom Tov cancels the rest of Shivah.
Poskim
Shulchan Aruch (YD 399:1 and OC 548:7): If one buried his Mes before a Regel and Aveilus applied to him and he conducted like an Avel even for a moment before the Regel, the Regel interrupts Aveilus and cancels Shivah. He completes Sheloshim after the Regel. This is only if he conducted like an Avel before the Regel, even just in private matters (refraining for relations), e.g. if he heard a Shemu'ah Kerovah (that one of his relatives died within the last 30 days) on Shabbos that was Erev ha'Regel. If he did not conduct like an Avel, whether he was Shogeg or Mezid or because he found out too close to Yom Tov or all the more so if he did not find out before Yom Tov, Yom Tov does not cancel Shivah.
Mishnah Berurah (26): Any conduct of Aveilus suffices.
Kaf ha'Chayim (32): There is no cancellation regarding things done to help the Neshamah of the Mes, such as saying Kaddish or lighting Neros.
Kaf ha'Chayim (34): One should not conduct Aveilus close to dark during Tosefes Yom Tov. If one did b'Shogeg, he is exempt from Shivah.
Beis Yosef (DH u'Mah she'Chosav v'Davka): Even when the Regel does not cancel Shivah, it counts towards Sheloshim, provided that he knew of the death before the Regel.
Shach (4): Surely, the Beis Yosef means that he knew of the death during the Regel.
Shulchan Aruch (YD 399:6 and OC 548:11): Rosh Hashanah and Yom Kipur are like Regalim to cancel Aveilus.
Shulchan Aruch (YD 399:5 and OC 548:10): If one of the first six days of Avielus was Erev ha'Regel, he may launder, but he may not wear the garment until night. It is good to launder only after midday, in order that it will be evident that it is due to the Regel. He may not bathe until night. Some permit to bathe after Tefilas Minchah, close to dark.
Beis Yosef (OC DH ul'Inyan): The Rosh and Ramban allow laundering, like the Ra'avad. Even though the Rif and Rambam do not permit until the Regel, perhaps they say so only regarding bathing, which is permitted on Yom Tov.
Magen Avraham (14): We allow laundering and bathing on Erev ha'Regel, for doing so then benefits him during the Regel. This does not apply to sitting on chairs or wearing shoes, so they are forbidden.
Kaf ha'Chayim (54): Eliyahu Rabah and Bigdei Yesha permit everything after Minchah.
Question (Beis Yosef DH u'Mah she'Chosav Rabeinu Mutar): The Tur permits to shave on Erev ha'Regel, no matter which day of Shivah it is. This is difficult, for we permit an Avel to shave on Chol ha'Mo'ed if he was unable to before the Regel, e.g. his seventh day was Shabbos Erev ha'Regel (17b). The Rosh agrees with the Ra'avad who permits shaving on Erev ha'Regel because shaving is forbidden all 30 days. Surely this is when Erev ha'Regel is the seventh day!
Answer #1 (Beis Yosef DH Aval): I would say that 'shaving' is a textual mistake in the Tur, but it says so also in Yoreh De'ah, and also R. Yerucham permits. It seems that they hold that we always permit Erev ha'Regel, but not on the previous day, e.g. when Erev ha'Regel is Shabbos.
Answer #2 (Darchei Moshe 2): The Tur permits shaving that is permitted on Chol ha'Mo'ed, such as the mustache.
Mishnah Berurah (40): The Aveilus is until Bein ha'Shemashos; perhaps it does not apply to Tosefes Yom Tov. The Bach says that Tosefes is two hours before evening (Tzeis ha'Kochavim).
Rema (YD): This is our custom (to bathe after Minchah).
Rema (OC): Our custom is to forbid bathing all 30 days. Therefore he may not bathe, for the Regel cancels only Shivah. The same applies to laundering where the custom is to forbid all 30 days.
Question: The Rema contradicts what he wrote in Yoreh De'ah!
Answer #1 (Bach YD DH Ach): In Orach Chayim he teaches that since we are stringent for all 30 days, we should be stringent on Erev ha'Regel. In Yoreh De'ah he teaches that our custom is to be lenient; people accepted to be stringent only when the Regel does not interrupt.
Answer #2 (Shach 16): Our custom is to be lenient only for Kavod ha'Regel. In Orach Chayim he teaches that where this does not apply, e.g. after the Regel, it is forbidden until Sheloshim.
Answer #3 (Magen Avraham 15): Our custom is to be stringent. In Yoreh De'ah he permits on Erev ha'Regel for those who do not forbid all 30 days.
Mishnah Berurah (42): Our custom is to be lenient, like the Rema in Yoreh De'ah.
Kaf ha'Chayim (55): It is best to be stringent, unless one is used to bathing and is pained if he cannot. One who wants to bathe or be Tovel in cold water to honor the Regel may do so.