Berakhot 60b:12-61a:1
Berakhot 60b:12-61a:1 · Tractate Berakot by A. Cohen
אָמַר רַב הוּנָא אָמַר רַב מִשּׁוּם רַבִּי מֵאִיר, וְכֵן תָּנָא מִשְּׁמֵיהּ דְּרַבִּי עֲקִיבָא: לְעוֹלָם יְהֵא אָדָם רָגִיל לוֹמַר: ״כׇּל דְּעָבֵיד רַחֲמָנָא לְטָב עָבֵיד״.
Rab Huna stated that Rab said in the name of R. Meir, (and it has been similarly taught in the name of R. 'Akiba) : A man should always accustom himself to say, "Whatever the All-merciful does, He does for the best."
כִּי הָא דְּרַבִּי עֲקִיבָא דַּהֲוָה קָאָזֵיל בְּאוֹרְחָא. מְטָא לְהַהִיא מָתָא, בְּעָא אוּשְׁפִּיזָא לָא יָהֲבִי לֵיהּ. אֲמַר: ״כׇּל דְּעָבֵיד רַחֲמָנָא — לְטָב״. אֲזַל וּבָת בְּדַבְרָא, וַהֲוָה בַּהֲדֵיהּ תַּרְנְגוֹלָא וַחֲמָרָא וּשְׁרָגָא. אֲתָא זִיקָא כַּבְיֵיהּ לִשְׁרָגָא. אֲתָא שׁוּנָּרָא אַכְלֵיהּ לְתַרְנְגוֹלָא. אֲתָא אַרְיָה אַכְלֵיהּ לַחֲמָרָא. אֲמַר: ״כׇּל דְּעָבֵיד רַחֲמָנָא — לְטָב״. בֵּיהּ בְּלֵילְיָא אֲתָא גְּיָיסָא, שַׁבְיַיהּ לְמָתָא. אֲמַר לְהוּ: לָאו אֲמַרִי לְכוּ כׇּל מַה שֶּׁעוֹשֶׂה הַקָּדוֹשׁ בָּרוּךְ הוּא
As when R.'Akiba was journeying by the way, he came to a certain town and asked for hospitality, but it was refused him ; so he exclaimed, "Whatever the All - merciful does is for the best." He went and spent the night in the field, having with him a cock, an ass and a lamp. A gust of wind came and extinguished the lamp, a cat came and ate the cock, and a lion came and devoured the ass ; but he exclaimed, "Whatever the All-merciful does is for the best." That same night a band of robbers came and captured the town. He thereupon said to them, "Did I not tell you that whatever the Holy One, blessed be He, does is
הַכֹּל לְטוֹבָה.
all for the best!"