For many of us, our job is, in effect, a major relationship in our lives. Even though it's not a person, it's something you spend a lot of time on, put a lot of effort into, feel pleased when you are recognized for your effort (not just financially, but verbally), receive companionship, etc. It can start to feel like a friendship. Well, when push comes to shove, most companies watch out for themselves. When times get tough, they watch out for their owners and their balance sheets, not their employees. Not all companies, but most. Realistically, we all probably have a friend or two who is like this, too.
If you know the layoff is coming, try to start looking at your job as a business relationship. Your time & effort in exchange for a paycheck & insurance. This doesn't mean you need to stop being friends with the people you work with. It just means you should try to stop looking at your employer/job as any type of friendship relationship. It's business only.
Speaking of friends at work, if you are laid off, you will not being seeing them everyday anymore. When my DH was laid off, being home alone all day was very difficult for him. The first day he was literally waiting at the door when I came home. He wasn't close friends with anyone at work, but having no companionship at all during the day made him feel very isolated. This would be one thing you could try to prepare for. Make sure you have opportunities to spend time with other people. Your mental health is important.
Two other things to keep in mind when you're thinking about a layoff...it's not the end of the world. Life WILL go on. Also, there will be a silver lining. Ours was that it forced us to be more responsible about money. A huge blessing for me was that my husband had to give up his car. I know that sounds bad, but he bought a brand-new car shortly before we got married even though he has a ton of debt. In my eyes it was a bad decision, but we weren't married yet or living together so our finances weren't mixed at all. After he got laid off, the payments were too much. Fortunately he was able to return it through that Huyandai Assurance program. So now that darn car with its high payments is gone and has been replaced by another vehicle with reasonable payments instead :) Just look for the silver lining, it's there!
Good luck...