Welcome to the daily chizuk (encouragement). If a person finds himself in a situation in life that he's not so happy about, he has a golden opportunity. If he will justify Hashem and convince himself that it's really good for him, he will be rewarded tremendously. The Chovot HaLevavot in the Sha'ar HaBitachon describes different scenarios. He says that if a person is not achieving in business, or his money is coming in a way that's not so honorable, if that person says, “Hashem said, ‘I will never forget the kindness that you did for me and the love that we had when you followed me into the desert, into a land that was not sown.’” Thousands of years later, Hashem still brags about this. The Chovot HaLevavot says that every time a person has this test, he doesn't know where he's going to get his food from. And he responds with Emunah (faith), he is rewarded, and Hashem considers, like the Jewish people going after him in the desert.
If a person loses his job and hasn't found a new one yet, he has to think to himself: How is this good for me? Maybe now I have some extra time to pray with a slower minyan (prayer quorum) in the morning. I have some extra time to learn more Torah. I have some extra time to spend with my family. Maybe Hashem has something much better in mind for me. Someone once told me that his business burned down, and it looked like the worst thing, but he ended up in a whole new line of work, and now he's so much happier and making a lot more money.
If someone was about to get married and the other party broke it off, it's an opportunity to justify Hashem. You have to think: Hashem just saved me from marrying the wrong person. Although it doesn't seem that way now, Hashem knows better, and He knew that this person wasn't the right one for me. If a person is feeling lonely, try to think why it's good. Maybe you have fewer obligations, more time to do Chesed (kindness), Avodat Hashem (service of God), whatever you have to do. Whatever the situation is, look for the good. How many times in our own lives did we go through situations that we thought were the worst, and in the end, they turned out to be the best? If you are able to think why it's good while you're still in the tough situation, it's such a great service to Hashem, and you will feel so much better. The more you think of the different possibilities of why it's good, the more soothing it will be.
Rabbi Ephraim Waxman once told the story. When he was a young boy, he remembers that his sink—Rabbi Ephraim Waxman once told the story, when he was a young boy, he remembers that his sink—got clogged on Erev Pesach (eve of Passover), the worst time. They managed to get a plumber to come and fix it, and he found his mother's diamond from her ring in the pipe. If the sink didn't get clogged, the diamond would have been gone. Hashem does this to us all the time. We have to look in every situation and say, “Where is the diamond here?” Have a great day.

