The renowned chasid Reb Leibel Kutner zt'l (who lived through the Holocaust) would often say the following thought: Of all the Avos, Yaakov Avinu endured the most hardship. He suffered from Lavan, from Eisav, Dinah’s kidnapping, and then losing Yosef. But about Yaakov it states (32:13) ve'atah amarta heitev eitiv imach, "You said, 'I will surely do good with you.'" So we see that we don't know what is good. And indeed, despite all the tzaros Yaakov endured, he established the twelve shevatim.
It states (Tehillim 118:5) min hameitzar karati Kah anani bamerchav Kah, "From the straits I called Hashem; Hashem answered me with a vast expanse." The Rokeach (Siddur) explains that when people call out to Hashem and say they are in a meitzar, a difficult situation. Anani, Hashem responds and says to the Yid, bamerchav, that you are in a good situation. You think it is a bad situation, but it is all for the good.
The Chovos HaLevavos (Introduction to Shaar HaBechinah) writes that we should praise Hashem for the yesurim we suffer because we can be certain that concealed within the yesurim are many chasadim.
It states (32:32) vayizrach lo hashemesh ka'asher avar et Penuel vehu tzole'a al yereicho, "The sun rose for [Yaakov] when he passed Penuel, and he was limping on his thigh." Rashi writes, "The Midrash explains: The sun rose for him to heal his limp, as it states (Malachi 3:20) shemesh tzedakah u'marpeh b'knafeyha, 'The sun of mercy, with healing in its wings'. The sun hastened to set for him when he left Beer Sheva and set a few hours early; now it hastened to rise for him." Rashi and Chazal explain that the sun rose early that day to heal Yaakov. When Yaakov left Beer-sheva and came to Har HaMoriah (at the beginning of parashas Vayeitzei), the sun set two hours early so Yaakov would sleep there. Now, the sun made up for lost time and rose two hours early to heal Yaakov.
The Shevet Sofer writes in the name of the Chasam Sofer, quoting Reb Noson Adler zt'l, that these pesukim give chizuk to those who feel that the sun has set for them. As people say, "There used to be better times, but now the sun has set, and everything is dark." They don't see the light in their lives. They should learn from the Avos. The sun set for Yaakov Avinu in the middle of the day, and it looked like he and the world had lost two hours of daylight. But those two hours of lost sunlight returned twenty-two years later when Yaakov Avinu needed sunlight to heal his wound. We learn from this that even when something seems bad, it is all for our good.
The Importance of Joy and Acceptance
The final brachah (brachah achrita) said at a sheva brachos is asher bara sasson v'simchah chatan v'kallah. Kol Bo (siman 75) teaches that this brachah is an overview of the brachos said before it. The first brachah of the sheva brachos is shehakol bara lichvodo, "Everything was created for His honor." The chosson and kallah must know that the purpose of their marriage is to give honor to Hashem. Their marriage is not for their prestige, pleasure, wealth, or any other gain. The final brachah repeats the concepts of the brachos said before it. The idea of giving honor to Hashem is repeated in the final brachah when we say the words asher bara sasson v'simchah, "Who created joy and happiness." The Kol Bo explains: "It is Hashem's honor when people are happy because then they can receive His glory. This is because distress closes the soul and creates a barrier that separates the person from Hashem. A person shouldn't be angry but accept Hashem's decree with love... [Chazal tell us that] the Shechinah doesn't reside where there is laziness or sadness, only where there is joy, and this is Hashem's honor."
We learn from the Kol Bo how important it is to be happy and to accept everything that happens to us with love. This enables the Shechinah to reside by him, and this is Hashem's honor.