Deal with it
Losing a job looks bad, shutting a startup is worse but the worst thing is to try to run away from your failure. People who criticized your decision to start your own venture will act like demons in your life and haunt you at every single step. Learn to deal with them.
Accept the reality, figure out what led to the failure and seek for a way out. Meet with other entrepreneurs who have been through the same situation in the past and know their perspective towards failure. Try!
Do post mortem of your failure
Once you get back to your senses and return to normal self, dive into analysis of your failure. What went wrong? Was it emotional breakdown that caused this failure or you were fundamentally wrong? Did your strategies failed because of inefficient financial planning or inaccurate operational and marketing efforts?
You need to ask these and many more such question from yourself and write down their answers on a paper to let go residual pain and synthesize learning.
Go for an unplanned holiday
Take a break from your life. Pack for an unplanned holiday. Meet with people you don't know, learn the language you have never heard of, visit the places you have never seen and do the tasks you always dreamed of doing once you have a million dollar in your bank account. It will help you get rid of your failure and return to normal.
Once you've failed, you don't have to care about what others would think of you. You're back to normal and free to start everything all over again. Start afresh with a clear mindset, goals, and more organized approach. Drop all pre-occupied notions.
Say no to giving up. Keep these points in mind, turn your failure into a stepping-stone and forge ahead.