Most of the time, people get discouraged during hard times, during the storm from their lives.
You need to make sure that you are not blaming someone else for your problem, make sure you take the responsibility, even if you haven't done anything bad.
We all know that life is unfair sometimes, but when things go against you, when you have family problems, job insecurities, etc... please be aware and understand that everyone keeps an eye on you, to see how you react, how you handle the situation, to laugh or to clap when you are down.
Stay responsible, try to be calm and relax under their eyes, even if you are dying inside and at the same time try to understand the problem.
Ask yourself some questions (when/how did it happen, who did what, how did you know it happened, etc.) and try to analyze the problem and answer on a piece of paper to all these questions.
`There is a statistic, saying that if you put your problem down in writing, in most cases this will get solved.'
Then, you can find out what solutions are there available to solve your problem, what can you do to minimize the damage/the pain or why not to take advantage of the situation.
Finally, decide what actions you are going to take immediately, then implement it, and you will realize that the problem had easy steps for it to be solved.
At the end of the day, be thankful for the pain you feel today because it will be the strength you will feel tomorrow.
And don't forget: everything you are going through is preparing you for what you asked for, and one day all this pain will make sense to you!
"Tough times don't last, but tough people do!"