סימן קכח סעיף יב
הַרְבֵּה נוֹהֲגִין לְהִתְעַנּוֹת בַּעֲשֶׂרֶת יְמֵי תְּשׁוּבָה, וּלְפִי שֶׁחֲסֵרִים דּ' יָמִים שֶׁאֵינָם מִתְעַנִּים בָּהֶם, דְּהַיְנוּ בּ' יָמִים שֶׁל רֹאשׁ הַשָּׁנָה, שַׁבָּת, וְעֶרֶב יוֹם הַכִּפּוּרִים. עַל כֵּן מִתְעַנִּין תְּמוּרָתָן דּ' יָמִים בִּימֵי הַסְּלִיחוֹת שֶׁקֹּדֶם רֹאשׁ הַשָּׁנָה, דְּהַיְנוּ יוֹם א' דִּסְּלִיחוֹת. וְעֶרֶב רֹאשׁ הַשָּׁנָה, וְעוֹד בּ' יָמִים בֵּינְתַיִם, וּבוֹחֲרִים בְּיוֹם בּ' וְה. וְאִם אֵרְעָה לָהֶם סְעוּדַת מִצְוָה, יְכוֹלִין לֶאֱכוֹל וְיִתְעַנּוּ יוֹם אַחֵר תְּמוּרָתוֹ. אוֹ אִם יוֹדְעִים שֶׁתִּהְיֶה לָהֶם סְעוּדַת מִצְוָה, יִתְעַנּוּ מִקֹּדֶם יוֹם אֶחָד תְּמוּרָתוֹ (עַיֵן לְעֵיל סִימָן קכז סָעִיף ג וְסָעִיף יד) (תקסח תקפא).
Many people are accustomed to fast during the Ten Days of Penitence, but since this period includes four days on which fasting is not permitted, namely, the two days of Rosh Hashanah, Shabbos, and erev Yom Kippur, they make up for them by fasting four of the Selichos days before Rosh Hashanah, that is, the first day of Selichos, erev Rosh Hashanah and two other intervening days, preferably Monday and Thursday. If a meal that is considered a mitzvah occurs [on one of these days] they are permitted to eat at the meal and compensate by fasting on another day. If they know beforehand that they are invited to a meal celebrating a mitzvah, they should fast the day before [the meal], to make up for it.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)