it is all for the best/ Don't despair !
By analogy: even this matter which seems bad will bring a good thing in its consequences. The expression is said when one examines or hears about a sorrowful event that occurred and expresses faith or a wish that a good thing will emerge in the end from that matter.
(Nachum Ish Gam Zo Hayah was accustomed that for everything that happened to him he said: 'It is all for the best' - Sanhedrin 28b, and similarly: And whoever is settled in his soul... whenever he finds trouble he says: 'It is all for the best,' and he will live sweet lives always, and the troubles will be light upon him - Rabbi Yehuda Halevi/ HaKuzari, Third Treatise, 11, 83, and also: He says, for a Jew must justify the judgment on himself and always say: 'It is all for the best' - Shalom Aleichem/ What Happened to Us in Brody, mild, and also: But Menashe Hayim drove away every thought of sadness from his heart and said: 'It is all for the best' - Agnon/ Elu Ve'elu, Ve'hayah Ha'akov Lemishor, 97, and also: Even Ezra Siman Tov did not escape bad troubles... and we heard no complaint nor sigh from him, because he was accustomed to say: 'It is all for the best' - Chaim Sabato/ Ke'af'afei Shachar, 43)
Translation
Expression (Hebrew)
גַּם זוֹ לְטוֹבָה !
Definition (Hebrew)
בְּהַשְׁאָלָה: גַּם הַדָּבָר הַזֶּה שֶׁנִּרְאֶה רַע יָבִיא דָּבָר טוֹב בְּעִקְבוֹתָיו. הַבִּטּוּי נֶאֱמַר כְּשֶׁמַּבְחִינִים אוֹ שׁוֹמְעִים עַל דָּבָר מְצַעֵר שֶׁקָּרָה וּמַבִּיעִים אֱמוּנָה אוֹ מִשְׁאָלָה שֶׁיֵּצֵא מִמֶּנּוּ דָּבָר טוֹב בְּסוֹפוֹ שֶׁל דָּבָר.
נַחוּם אִישׁ גַּם זוֹ הָיָה רְגִיל דְּכֹל דַּהֲוָה סָלְקָא לֵהּ (הָיָה רָגִיל שֶׁבְּכָל מָה שֶׁהָיָה קוֹרֶה לוֹ ) אָמַר :גַּם זוֹ לְטוֹבָה - סַנְהֶדְרִין קַח ע"ב, וְכֵן: וּמִי שֶׁנִּתְיַשֵּׁב עַל נַפְשׁוֹ...כָּל אֲשֶׁר תִּמְצָאֵהוּ צָרָה אוֹמֵר: גַּם זוֹ לְטוֹבָה, וְיִחְיֶה חַיִּים עַרְבִים תָּמִיד, וְתָקֵל עָלָיו הַצָּרוֹת - ר' יְהוּדָה הַלֵּוִי/ הַכּוּזָרִי, מַאֲמָר שְׁלִישִׁי, יָא, 83, וְכֵן: אוֹמֵר הוּא, כִּי חַיָּב יְהוּדִי לְהַצְדִּיק אֶת הַדִּין עַל עַצְמוֹ וְלֵאמֹר תָּמִיד: גַּם זוֹ לְטוֹבָה - שָׁלוֹם עֲלֵיכֶם/ מָה שֶׁאֵרַע לָנוּ בִּבְרוּדִי, קַלָּה, וְכֵן: אַךְ מְנַשֶּׁה חַיִּים גֶּרֶשׁ כָּל מַחֲשֶׁבֶת עָצֵב מִלִּבּוֹ וְאָמַר גַּם זוֹ לְטוֹבָה - עַגְנוֹן/ אֵלּוּ וָאֵלּוּ, וְהָיָה הֶעָקֹב לְמִישׁוֹר, 97, וְכֵן: גַּם עַל עֶזְרָא סִימָן טוֹב לֹא פָּסְחוּ צָרוֹת רָעוֹת... וְלֹא שָׁמַעְנוּ מִמֶּנּוּ לֹא תְּלוּנָה וְלֹא אֲנָחָה, מִפְּנֵי שֶׁהִרְגִּיל אֶת לְשׁוֹנוֹ לוֹמַר גַּם זוֹ לְטוֹבָה - חַיִּים סָבָתוֹ/ כְּעַפְעַפֵּי שַׁחַר, 43