The Kobriner zt'l would say, "A Yid must believe that the darkness has an end, and when the darkness leaves, light will shine." How did the Yidden have wood in the desert to build the Mishkan? Rashi (Shemos 25:5) writes, "Reb Tanchuma explains: Yaakov Avinu saw with his ruach hakodesh that Yisrael will build a Mishkan in the desert, so he brought ceder trees (ארזים) to Mitzrayim, planted them there, and commanded his children to take them along with them when they leave Mitzrayim."
But we can ask, why did Yaakov Avinu toil to arrange trees for the Yidden in the desert? Even without his efforts, Hashem would have certainly arranged wood for them. For example, they didn't have gems for the choshen in the desert, but Hashem provided them when needed. As Chazal say, gems rained down from heaven together with the mon. Neither did they have the skins of the תחש in the desert, because it was a new animal, which never existed before. Hashem created the tachash, and it was available only during the construction of the Mishkan (see Rashi Shemos 25:5). So, just as Hashem arranged the gems and tachash skins for the Mishkan, Hashem would have arranged the wood for the Mishkan, as well!
The Vayechi Yosef (of Pupa) zt'l and the Lubavitcher Rebbe zt'l answer that Yaakov Avinu didn't plant the trees so there should be wood for the Mishkan. He knew that Hashem could provide wood when it would be needed. He planted the trees, primarily to give chizuk to the Jewish nation. He wanted the Yidden in Mitzrayim to see the trees and hear from the elders that their forefather Yaakov said they would one day leave Mitzrayim and build a Mishkan. They will be their own nation, with a Mishkan and the Shechinah in their midst. These consoling thoughts would give them the strength to endure the hardships of galus.
We can learn from this counsel for people going through hard times and struggling to find ways to be happy. They should remember that the suffering will end. Better times will come. These thoughts make the challenging times more bearable.
The sefarim say that the galus in Mitzrayim was the root of all exiles, and the redemption from Mitzrayim is the root of all redemptions. Therefore, just as Yaakov Avinu encouraged the Yidden in galus in Mitzrayim, telling them that the suffering will end and they will be freed one day, we should do the same today. We must encourage Yidden in galus, that they should know they won't suffer forever. We will be redeemed. Moshiach will come, and all our tzaros will end.
Also, the individual who suffers in this world – each person in his own way – must know and be told that the suffering won't be forever. The hard times will pass, and better times will come.
It states (Mishlei 31:6) ֶׁשנָפ ֵיָרלְמ וְיַיִן ֵדלְאוֹב ָרֵכׁש ְּ נוּת, "Give strong drinks to the hapless, and wine to those of bitter soul." The Imrei Emes asks, how does alcohol help someone who feels lost and distressed? The alcohol will wear off, and he will be back with his tzaros and difficulties again! It pasuk surely doesn’t suggest that he should remain drunk forever!
But the answer is, by offering an alcoholic beverage, we are saying to the suffering person, "Your suffering isn't permanent. It is a difficult stage that will pass, and things will improve for you." That message, in itself, consoles, encourages, and brings joy.
Furthermore, the Imrei Emes added that even when the tzarah doesn't go away, one often finds out how what he thought was a problem was really for his benefit. And when one attains that insight, he can tolerate his difficulties.
It states (Tehillim 130:6) ֶרַבֹּקל ְרִיםֹּׁמִשמ 'ַהל ִׁיְשנַפ, "My soul is eager for Hashem, among those who wait for the morning". The Malbim explains the pasuk as follows: "When a person waits for a salvation, he isn't certain that he will see his salvation. But when a person waits for the morning, the morning will certainly come. Nevertheless, when a person has bitachon, he is certain that his salvation will come – more certain than someone who waits for the morning. [This is the meaning of the pasuk: 'ַהל ִׁיְשנַפ, 'I trust in Hashem' ְרִיםֹּׁמִשמ ֶרַבֹּקל, more than a person who trusts that the morning will come.] He relies on Hashem with complete bitachon that the salvation will come. He should be more certain about it than that the sun will rise in the morning."
Chazal (Shabbos 12) says that the Shechinah dwells above an ill person's head. The Maharal adds that the Shechinah is above every person who feels downtrodden, suffering, and low. The meforshim explain that the sick (and likewise, the people who feel downtrodden and broken) realize that no one can help them but Hashem. They feel entirely dependent on Hashem, and therefore they merit that Hashem is with them. Whereas, when a person thinks that he can manage on his own, this causes Hashem to depart from him.