Most of my life has been in a notoriously unstable industry, to this kind of thing is pretty common. Because it's a known unstable industry, most people involved take it as it goes. Most of the time, it's not painless, but it's not brutal, either. The exception in my case was getting called in by the boss, told I was being shown the door, and then going back to my desk to clear out. My computer was already locked, so I couldn't even check any last emails or print out any contacts I wanted to keep in touch with. I was told that I couldn't have any of that information, even though there was no competitive issue with letting me stay in touch with anybody. I reconstructed the information over time, so whatever the point was, it didn't work anyway. So who knows.
The irony is that the company was headquartered elsewhere, and my boss, who had shown me the door, was canned in the same summary way a couple years later. He never saw it coming, since he typically strutted around and made comments about how he had been invited to go to the head office and work his way up the ladder but that he was too devoted to the local office. Getting out of there was one of the best things that ever happened to me, although it didn't seem like it.
I hope the same for you, OP. When the shock wears off and the rocky next steps are over, I hope you land on your feet and find yourself in a far better situation. It could be a blessing in disguise after some period of frustration, feelings of betrayal, and anger. Best of luck to you.