I was part of a layoff once. At first I was kind of in shock. As soon as I started walking out the building I actually felt happy and excited. I saw it as a new opportunity and beginning of a new adventure. I have no idea where I might end up. It's made me open my eyes and mind to moving to other cities, learning technologies I'm not familiar with, applying for and considering other positions and the types of companies I'm willing to work for and meet new people.
Look at it as an opportunity. A new adventure and be open minded. That's what I have done and am actually feeling much happier. Find something you want to do and no longer are miserable every day doing.
The only part I do not like is the interview process that many companies have developed for software engineers. It can be extremely stressful and frustrating, but I guess you have to play the game.