Hm, that happens when someone gets disappointed with something, or whatever was planned did not go well and maybe failed. I do the following in such situations:
-think about what I can do and what I can learn.
-try to learn new things, explore new fields of interest and understand whether I suit there, or not.
-if I realize that I do, I start making a plan for me on how to achieve new goals. For example,
few months ago a friend of mine decided to give up on his profession (as a marketing manager) because he was not earning much and his salary was only enough for him to cover his renting fees and buy food. He was obviously not enjoying life, because he could not go out with friends, spend money in bars and cafes, travel or buy some fun staff. I offered him taking simple web development courses, because I had heard, that learning front end would not be too hard in case you have time and efforts to invest in. As long as it is a well paid job, I suggested him doing that. He took basic courses and realized, that he liked them and wanted to continue.
Now, he has a junior position (after studying hard for six-seven months) with the same salary as he was getting before, BUT he has a huge future ahead, and after a year he will definitely double his income.
This strategy works in other fields as well, and the hardest part is to get started. After you do, you realize that you are on the right track and everything will be fine in the future! JUST RISK THE FIRST STEP!