1. Don't take it personally esp. if it's a mass layoff.
2. Definitely prepare by having 6 months expenses saved ahead of time.
3. Apply for Unemployment Insurance immediately. You paid into it so it's yours to take.
4. Update your linked in and reach out to your network. There is no shame in getting laid off. Network, Network, Network.
5. Make searching for a new job, your full time job. Spend 8 hours a day doing it.
6. That said, use your new found flexibility and freedom to your advantage. Sleep in a little if you want. Go to the gym at lunch or early afternoon. Make sure you are taking care of yourself.
7. When you get your next offer (and you will!!), make sure to start at LEAST two weeks out.
8. ENJOY those two weeks! You earned them!!
This is going to happen over and over in your career. I've been laid off during every recession and have always bounced back.