I received this excellent essay from one of our dear readers:
In our own lives, we all go through different periods of hardship. Sometimes we ask aloud to our Creator: “Why me? What did I do to deserve this? Why are You sending me these hardships? There is nothing wrong with asking these questions. For the Gemara  says, “A person whose suffering causes him to challenge G-d is not sinful.”
Then, why does Hashem send us hardships? Is it to make us miserable? The Chofetz Chayim tells us that the reason Hashem sends us hardships is: “…in order to test you, to do good for you in your end.” Yes, to test you! Nevertheless, most of us would rather take a written or oral test, than to have G-d test us in life.
Yet, the Medrash tell us something astounding: “G-d does not elevate a person to greatness until He first tests him – with a small matter.” For tests and challenges are not an unfortunate fact of life, but a sign of Hashem’s trust and confidence in our ability to prevail. Yes, He ‘knows’ how difficult things are for us. For the Gemara  states: “G-d does not make matters difficult for His creatures. However, He does expect a person to perform according to his capacity.” As Koheles  says, “Whatever you are capable of doing with your own strength, do it.”
Hashem gave us free will. Therefore, if we fail a challenge that He sends us, don’t give up! Rav Tzadok HaKohein of Lublin writes: “Just as one must believe in Hashem, so too, one must believe in himself. Hashem wants us to BELIEVE in our strengths, capabilities, ability to overcome evil and achieve greatness.” In the words of Rav Scheinberg: “Serving the Almighty properly involves constant challenges, which takes consistency and persistence to succeed… Only FOOLS give up HOPE.”
What about suffering? Why do we suffer? The Chofetz Chayim cites a Medrash  which states that Yitzchak Avinu asked that man should endure suffering as an atonement. No one can escape suffering. As the Medrash  states: “There is no man who goes through life without afflictions!” Still, the Gemara  says: “Pain that a person suffers in this world atones for sins.”
Speaking of atonement, the Gemara asks: “Why are the righteous removed before their time? To atone for sins of the generation. Because when the wicked flourish in the world, the righteous found among them are seized for their sins.” Then, there is the universal question of: “Why do the wicked prosper and the righteous suffer?” Rashi  answers that in his lifetime (i.e. of the wicked person), he pays him that which is coming to him for the good that he has done, in order ‘to make him perish’ from the World to Come.
The posuk  said: “In order to test you, to do good for you in your end.” What does “in your end” mean? It’s referring to the World to Come. We create our ‘estate’ in the World to Come based on how one deals with the challenges and situations that He sends us in This World. For the Gemara  says that World to Come is one of the three good gifts that Hashem gave to Yisroel that only comes through suffering. Furthermore, the Chofetz Chayim  states: “Whenever a person suffers in any way for the honor of Hashem, he is lifted to a higher station in the World to Come.”
What’s the next one? Torah. For Avos  states that one of the 48 ways that Torah is acquired with acceptance of suffering. As the Medrash  states: “…Fortunate is the man for whom the Torah is the source of his affliction.” As the saying goes: “No pain, no gain. ”For instance, one is in middle of Talmud Torah and suddenly he gets a headache, stomachache, bodily ailment or a situation came up that deprived him of sleep; don’t stop learning! Why? Because “The reward for keeping G-d’s commandments is increased in proportion to the effort and discomfort one experiences in its performance.”  The Medrash  says: “If you learn Torah when it is difficult for you, your reward is one thousand; when things are going smoothly for you, the reward is [only] two hundred. ”On the bright side, whoever engages in Torah study, the Torah makes him great and exalts him above all things. 
What’s the “best type” of suffering to endure? The Gemara answer: “When a person ignores insults, Heaven ignores his or her sins.” Rabbi Moshe Cordovero  points out that it is far better to achieve atonement for a sin by suffering an insult in silence than to undergo physical punishment which may interfere with one’s ability to perform mitzvos or study Torah.
Let’s face our daily challenges instead of running away from them. In this merit, may Hashem help us bring forth the hidden greatness that lies within ourselves!
 Yet, Rabbi David Aaron tells us: “When life gets rough, ask not ‘why’ this is happening to me but ‘what’ this happening is asking of me. In every painful situation choose to find opportunities for growth and humbly reserve judgment of the Master Mind of the universe.”
 Bava Basra 16b.
 Chafetz Chaim on the Torah volume 2, pages 241-243 and 253-254 (Israel Bookshop).
 Devarim 8:16.
 Bereishis Rabbah 55:1 and Shemos Rabbah 2:3.
 See The Aryeh Kaplan Reader, page 156 and Ramban to Bereishis 22:1.
 The Six Constant Mitzvos by Rabbi Yehuda Heimowitz and Rabbi Shai Markowitz, pages 146-147. See also The Aryeh Kaplan Reader, page 156.
 Because, “He knows all our thoughts” (see Tehillim 33:15).
 Avodah Zarah 3a. See also Shemos Rabbah 34:1.
 If You Were G-d by Aryeh Kaplan, zt”l, page 180.
 Tzidkas Hatzadik #154.
 Rav Scheinberg by Rabbi Yechiel Spero, page 261.
 Bereishis Rabbah 65:9.
 Ibid. 92:1.
 Arachin 16b.
 I.e. physically, emotionally or mentally.
 See Shabbos 33b, Mo’ed Katan 28a and Vayikra Rabbah 20:12.
 Berachos 7a.
 Devarim 7:10 “ומשלם לשנאיו אל פניו”.
 See note 3.
 Berachos 5a-b.
 See note 2.
 Avos 6:6.
 Bereishis Rabbah 92:1
 See Avos 5:25. There are many situations in life to which this applies.
 Interestingly, Toras Kohanim (20:26) tell us, “A person should not say that he doesn’t want to wear shatnez or that he has no desire to eat pork; rather, he should say that he would love to wear shatnez or to eat non-kosher meat, but he refrained from doing so because of Hashem’s command.”
 Shir HaShirim Rabbah 8:14.
 See Avos 6:1.
 Rosh Hashanah 17a.
 Tomer Devorah, chapter 2, 'השלישית - שיחשוב'.