Hi Hashi,
A tight team with your co-workers will limit the harm to yourself and others in the team....so surround yourselves with each other as much as you can.
Unfortunately the only thing you can do to stop bullying (and psychopathology) is to leave. But if you have to work there, then make it as safe as possible for yourself and others by rallying together, and not letting anyone in the team be alienated. Safety in numbers!
I definitely agree with keeping records and informing HR and your union (in the UK you have a legal right to be in a union even if there isn't one affiliated to your workplace or sector - you can join a more general one like the GMB or PCS and they can advise you and accompany you at disciplinary or grievance meetings).
I'm in two minds when you say the only thing to do is leave. I think perhaps there are two cases when you don't have to- only in some work situations, though, never in abusive personal relationships where the only thing is always to leave.
One is if the intended target can just shrug off the behaviour. I've seen people do this in a previous situation - one would simply laugh then get on with his work and the other would hold up her hand and say, "I did that because of X. Now I need to get on with Y or it won't be done on time." I think that was their natural temperaments, but I've tried modelling it and it's amazing how much more effective it is than trying to reason with a bully boss. The most effective thing is to refuse to engage with any of the things they've said (or shouted) and instead ask neutrally, "What would you like me to do?"
The other is if the bully is the newest arrival. This is my current situation - we were already a competent team and worked well together, so it's not so easy for the new boss to intimidate someone when he kicks furniture, yells, accuses them of
his mistakes, crticises them in front of others etc. It makes a horrible atmosphere and constantly disrupts our work, but I think it's only because I have PTSD/trauma issues that I'm so badly affected by it. Also, I've been the most targetted - I can see that I fit many of the characteristics Tim Field gives as typical of bullying targets. He's now starting to target someone else in a more subtle way and set them and the rest of us against each other. But because I'm aware of his tactics I'm countering them all the time. And even though the grievance I raised wasn't successful I think it sent him a warning signal. I refuse to let someone ruin our working lives because he can't do his job.
It's very true that sticking together is powerful and I'm so sorry that others saw what was happening in your situation and ignored or encouraged it. Workplace bullying can be very serious and can inflict a lot of trauma.