סימן קכז סעיף יד
תַּעֲנִית שֵׁנִי חֲמִישִּׁי וְשֵׁנִי שֶׁלְּאַחַר פֶּסַח וְשֶׁלְּאַחַר סֻכּוֹת, וְכֵן בַּעֲשֶׂרֶת יְמֵי תְשׁוּבָה, שֶׁלֹּא קִבְּלָהּ בִּשְׁעַת מִנְחָה, אֶלָּא שֶׁהוּא מִתְעַנֶּה מִכֹּחַ הַמִּנְהָג, וַאֲפִלּוּ כִּוֵּן בִּשְׁעַת עֲנִיַּת אָמֵן עַל מִי שֶׁבֵּרַךְ, כָּל שֶׁלֹּא קִבְּלָהּ בִּשְׁעַת מִנְחָה, אִם אֵרְעָה בְּרִית מִילָה אוֹ פִּדְיוֹן הַבֵּן אוֹ שְׁאָר סְעוּדַת מִצְוָה, מִצְוָה לֶאֱכוֹל וְאֵינוֹ צָרִיךְ הַתָּרָה. כִּי כָל הַמִּתְעַנֶּה בְּיָמִים אֵלּוּ, עַל דַּעַת הַמִּנְהָג הוּא מִתְעַנֶּה, וְהַמִּנְהָג לֹא נִתְיַסֵּד לְהִתְעַנּוֹת בִּמְקוֹם סְעוּדַת מִצְוָה.
If you fast on Monday, Thursday, and Monday following Pesach and Sukkos, as well as on the Aseres yemei teshuvah, [the Ten Days of Penitence], and you did not commit yourself to fast during Minchah, but your fasting is motivated by the custom, even if you had in mind to fast, when responding Amein to the Mi shebeirach, as long as you did not resolve to fast during Minchah, then, if there is a bris [circumcision] or a pidyon haben [redemption of first born male] or any other meal celebrating a mitzvah, you are fulfilling a mitzvah by eating,12In such a case, you need not even repay the fast on a later day. (Ibid. 568:17) and you need not absolve your vows, for whoever fasts on these days is following the rules imposed by custom, and this custom of fasting was not intended in regard to a meal in celebration of a mitzvah.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)