Allow yourself accept it and give a reason to get your life going, the first advice Westhill Consulting Career and Employment, Australia provide to people who lost their jobs. It doesn’t matter how self-assured you are, losing a job always grounds you to doubt yourself. In general the two responses are to distrust yourself and your capability, or to guilt your situation or your people at your old company. Both are not worth doing. The best thing you can do is discover a credible purpose why this occurred and then truly believe it. It's the first step to moving on.
Agree on two things to do. This should serve as a warning that it is you who will decide on your life at the end of the day. Telling yourself that you should try to discover what you want to do with your life now that you've lost your job is a cliché. The first thing you must do is to bring in the money you'll need to support yourself or your family. Next is what you truly want to do for a career. By unraveling the two, you can reason more plainly about your future in the short and long term. That way, you can keep your eye on preparing for the better job at the same time if you need to take a job for money that isn't perfect.