This! You should always be in learning mode. The other day, I wrote about 5 reasons to interview while still employed.
A few years ago, I was let go from a job. I didn't enjoy being part of that team, and somewhat expected the layoff (in fact, I had started talking to people in my network to find opportunities), but the day I heard the news was horrible.
Although nothing prepares you for being let go, you can take it as a big lesson learned and use it to your advantage.