Shemos begins with a description of galus Mitzrayim. Rav Wolbe comments (Shiurei Chumash Parshas Shemos 1:10, 5:14) that while other nations relate to exile as something entirely negative, the Jewish People understand that galus is also very beneficial. Mitzrayim is referred to as the "kur habarzel" (Devarim 4, 20). Rashi explains that kur habarzel is a pot used for refining gold. The exile in Egypt refined and purified Bnei Yisrael, thereby honing them into the Chosen Nation.
However, at face value, it seems that the galushad the exact opposite effect! Bnei Yisrael descended all the way down to the forty-ninth level of impurity, and the only credit whereby they merited redemption was their holding fastidiously to their Jewish names, language and mode of dress. How was the benifit of galus achieved?
The Torah tells us (Shemos 5:14) that the Jewish taskmasters were lashed when Bnei Yisrael failed to fill their daily quota of bricks. Rashi explains that they had compassion on their brethren and therefore they did not push them past their limits. The taskmasters paid dearly for this kindness because whenever the daily total of bricks fell short, they were the ones who endured the punishment. This was a manifestation of the purification process achieved by the galus. While in years of tranquility Hashem might gauge a person by his performance in the area of Torah and mitzvos, duringgalus Hashem measures a person by his level of mesirus nefesh. The taskmasters bared their backs for the sake of their brethren, thusly bringing out their greatness. This ultimately secured for them the coveted position of "Elders" whereby they reached the level of prophecy (as mentioned in parshas Beha'aloscha).
During the Holocaust the Nazis set up Jewish coalitions with the intention that the Jews in the coalition would gather lists of other Jews to be deported to concentration camps. While some Jews complied, others endangered themselves and refused to comply. There were even those who committed suicide to protect their brethren from being killed. Additionally, there were many Jews who were moser nefesh - literally sacrificing their lives - to perform mitzvos. For example some gave up their rations of bread to buy tefillin or a siddur. The story is told of a young boy who gave up his rations and fasted for three days so that he could buy a few pages of a siddur! We simply cannot fathom how precious and dear such a mitzvah is to Hashem! This boy in galus attained a level so lofty, that in times of tranquility only the most righteous can even hope to attain.
Bnei Yisrael are again in galus, and once again there is a purpose for the galus. A Jew who performs under duress rivals the highest levels attained by the greatest people during times of spiritual plenty. The Arizal was asked that if the earlier generations who were so holy and righteous didn't succeed in bring Mashiach, how could we, on our relatively low spiritual level, possibly expect to bring Mashiach? He answered that specifically because the spiritual level is so low nowadays, even the smallest mitzvah is as potent as the mitzvos performed by those living in earlier generations. While it is unfortunate that we're in galus, we are fortunate to have the ability to elevate ourselves to the highest levels of spirituality with every single mitzvah performed. Another five minutes ofTorah learning, a phone call to cheer up a neighbor, aperek of Tehillim are all diamonds of inestimable value!