Don't blame yourself:
The first and the foremost thing you should do is support yourself. Do not ever curse, rather embrace and encourage yourself. You must know that opportunities lie in adversities. So if you know that you are expected to get laid off in next couple of weeks or months, start filling yourself with positive thoughts. This is the only way to prepare mentally when losing job.
The next thing you should do is to start saving money. Off course, you cannot avoid necessary expenditures but you should avoid extra expenses like dining out, going to cinema, buying magazines etc. Moreover, you should plan a budget and then confine yourself to that financial plan.
Show your flexibility:
Another way to survive during this tough period is to show your versatility to your supervisor. If they know that you are ready to work at any other position then chances of getting a new job in the same company are high.
Notify your friends and family:
You should not hesitate in telling your friends and family members about this development. This will not help you in spreading the news and announcing your availability but this exchange of information will also give you a chance to know the market.
Another important thing to prepare yourself when losing the job is self evaluation. Spare some time for yourself and try to determine your strengths and weaknesses. You may seek help from others and ask them to rate you honestly. Make sure that you are taking all the criticism seriously and trying to improve your skills.
Create a resume:
Last but not the least; you should create an effective resume. You must know how to sell your skills. Make multiple resumes to enhance your chances of success.