Losing a job is an experience that everyone has to go through at some point in their lives. It's very rare that someone ever stays in the same job for the duration of their lives so it's important to remember you're not alone in this.
Once you have lost your job it's important to keep a positive frame of mind. This is obviously much harder then it sounds. The experience is often very scary because you don't know what is going to happen next and human beings in general have a natural fear of the unknown. You need to keep telling yourself that now you have an opportunity to do something else. When you speak to people who ask how your feeling about losing your job tell them that you are happy as now you have the opportunity to explore other jobs and perhaps other careers. This obviously might not be the whole truth but if you keep telling yourself and others this then eventually you will believe it and feel better about the situation.
It is important to remember that you WILL always find another job. You're not going to starve to death unless your really lazy. If you are focused and start applying for new jobs straight away then you could have interviews lined up within a week depending on the industry you are in. Therefore, for at least a week or two weeks after losing your job you need to treat it as a "holiday". Sleep in, meet friends for drinks, go to the cinema or restaurants and basically enjoy it while it lasts. If you spend this time off the job just moping around then very soon you will be back in a job and wishing you had taken some quality time off.
Depending on what your job was there is always a chance you wasn't actually particularly happy with that career anyway. It's possible it was just a means to an end and you use to just spend your working days wishing for them to end. Well that is no way to live your life and you should actually consider losing your job as a blessing. Every person has a passion for something so why not now take the opportunity presented to you to pursue these passions? I expect you will have some money in savings and some severance pay so take at least a month or two out to pursue a new career. If it doesn't make any progress within a few months then just return to your old career as with your experience you should have plenty of offers when you start re-applying.
If worst comes to the worst and your finding it hard to get another job there so many ways of making money online or temping jobs constantly on offer. Temping has taken off recently as companies prefer to hire staff in the short term.