It’s a bit late, but from the beginning, everything should have been done with a smile on your face while immediately starting on a new job search.
I had something similar some years ago. I immediately started looking for another job and had signed a job offer in two weeks. With everything signed and done, I then confronted by boss.
Never looked back. The operation/department has since closed down and I’m not at all surprised. It was a gift, really, what this boss did to me.
Perhaps you can still implement some kind of similar plan, like acting as if you don’t care about the bonus any more.