It sounds like you got your arse kicked for being a jerk. Oops.
There's a psychological model for this called DARVO, knowing about it might help you recover.
https://en.m.wikipedia.org/wiki/DARVO
DARVO is an acronym for "deny, attack, and reverse victim and offender". It is a common manipulation strategy of psychological abusers.[1][2][3] The abuser denies the abuse ever took place, attacks the victim for attempting to hold the abuser accountable, and claims that they, the abuser, are actually the victim in the situation, thus reversing the reality of the victim and offender.[1][3] This usually involves not just "playing the victim" but also victim blaming.