When Yaakov met with Yosef, Yaakov said (46:30) חָי ָעוֹדְך כִּי פָּנֶיךָ אֶת רְאוֹתִי אַחֲרֵי הַפָּעַם אָמוּתָה, "Now I will die, after my having seen your face, because you are still alive." We wonder why he mentions death at this very joyous time.
Rebbe Shlomo Kluger zt'l (Chochmas HaTorah, Vayechi, 5583) explains that Yaakov was destined to die at this time. His lifespan was supposed to be until age 130, which was how old he was at this time. This is the reason he said הַפָּעַם אָמוּתָה, "Now I will die", because it was indeed destined for him to die then. However, days and years were added to Yaakov Avinu's life, and he was able to live another 17 years, until 147 years old. This is because in Mitzrayim, Yaakov suffered humiliation, since it was humiliating for him to be supported by his son, Yosef. When he lived in Eretz Canaan, he had a lot of honor. Even when there was hunger, there was food in his home (see Rashi 42:1 on תתראו למה). In fact, the idea that Yaakov had to leave Eretz Canaan and go down to Mitzrayim was humiliating for him. Nevertheless, Yaakov accepted Hashem's decree with love and without complaints. In this merit, he was granted another seventeen years of life.
Therefore, it states at the beginning of parashas Vayechi (47:28) שְׁבַע מ ִצְר ַיִם בְּאֶרֶץ יַע ֲקֹב וַיְחִי שׁ ָנָה עֶשְׂרֵה, "This means that since he was now living in Mitzrayim, he could live another seventeen years!
Let us learn two lessons from the above: (1) Know the benefit that comes from yesurim. One can never know how much good he receives, due to the tzaros he endures. The tzaros might be giving him life itself. (2) Also, let us recognize the immense reward that comes to those who accept Hashem's hashgachah, without complaints.
Reb Shlomo Kluger added that this is what Chazal (Chagigah 5a) mean when they say that a talmid chacham, במיליה דמעביר, who forgives others, is granted a longer life. This doesn't only refer to the times he forgives the people who harm him. It is also when he accepts Hashem's decree, and he doesn't complain. (In a way, he is forgiving Hashem.) He, too, will be granted more years to his life.
The Chofetz Chaim (Shem Olam, ch.3, footnote) quotes the Vilna Gaon zt'l: "If it weren't for the yesurim, we would have no place in Olam HaBa."
The Chofetz Chaim explains that after one's passing, when a person stands before the beis din in heaven, and the scale of his deeds tilts to the side of guilt, a bas kol will announce, "Where are the yesurim that he had in this world?" Immediately, all the yesurim of his lifetime will rush to the right side of the scale. The scale becomes heavier on that side, and he will be sent to Gan Eden. This is because yesurim atone for many of his aveiros, and now he is a tzaddik. The person then praises Hashem for all the yesurim he went through. As Chazal (Sifri HaAzinu) state, "Whenever I bring yesurim to them in this world, let them remember how much kindness I am giving them in the next world."
Menoras HaMaor writes, "Yesurim cleanses a person from his sins, and if he will accept them with joy and he will say that Hashem is correct in His judgment, Heaven will have compassion on him and free him, and his entire generation, from their tzaros. As Chazal (Taanis 8a) state, 'Whoever is happy with his yesurim, he brings salvation to the world.'"
At the beginning of the parashah, Yehudah speaks to Yosef, and the purpose of the conversation was to convince Yosef to allow their brother, Binyamin, to go free. However, when we read the pesukim, we don't see that Yehudah added anything that Yosef didn't already know! He said (44:19)אֲדֹנִי אָח אוֹ אָב לָכֶם ׁה ֲיֵש לֵאמֹר עֲבָד ָיו אֶת שָׁאַל, etc. things that Yosef knew. How would these words convince Yosef to free Binyamin?
Sfas Emes answers that Yehudah wasn't trying to tell Yosef something he didn't know. Rather, he was reviewing to himself the events that unfolded, to remind himself that it was all planned and arranged by Hashem. He did this to accept Hashem's decree with joy. If this was Hashem's will, it was good, and the best that it could be. When he accepted Hashem's decree, all the dinim went away, and the salvation began. He writes, "This is a counsel for every time there is hester panim; to accept Hashem's decree, and to know with clarity that within the concealment is Hashem's will." When one has this awareness, the troubles end.
Sfas Emes (Berzhan, Noach) writes, "We have a kabbalah that Eliyahu HaNavi is in the marketplace (see Taanis 22a)... When people are busy earning their parnassah, it is hard for them to have yishuv hadaas and to think correctly, and to believe that everything is always with Hashem's hashgachah, Who gives existence and leads nature according..."