Trite but true. One door closes, another opens.
I'm a computer programmer. This means "disposable" in business-speak. I've been laid off a few times. I can tell you the feeling of rejection is horrible. Yet there's also some excitement about the prospect of doing something new and different.
The Man is going to whack you. When he does, be sure you're ready. Build a network of friends and acquaintances who will give you an "in" to the next position. Keep your skills up-to-date. Know what you'd like to try next and prepare for it. Do this constantly so when the axe falls, and it will, you're ready on day 1.