In time, you will come to see it as a good thing. I speak from experience.
Right now, it feels shameful, it feels demeaning, it feels as if you are unwanted and useless. It tears down your self esteem and your life, in one vile swoop - we spend so much time at work, a lot of us take pride in our work and it is part of what makes us, on a day to day basis, that you can suddenly find yourself wondering who you are, if your work is gone.
It takes time to recover, and, contrary to what you might expect, recovery doesn't start the moment you get the pay out and leave. It's going to come and hit you like a ton of bricks, then you'll be in a processing phase, then you'll start the recovery. You WILL build yourself back up again. YOU will go on to have better times, and a happier working life. You will come to realise that although they behaved atrociously, if they had not done this, you would have hung on by a thread for likely some years to come, being slowly and painfully more broken. The shove had to come from somewhere, because we do hang on to things that bring us familiarity and comfort, even if they are negative and draining.
You have nothing to be ashamed about. The schoolyard bullies who grew up to be workplace bullies, do.
I'm thinking of you. I've been down this road. The rug being pulled under when I was at my lowest ebb (which is a common tactic workplaces do, by the way, go after you when you're at your weakest) wiped me out for a year or so.
I was utterly broken and didn't recognise until I aired my head again, how ill it had made me.
I look back and shake my head in shame, at them. They know what they did. And people in your workplace will be ashamed of what's been done to you, as well.