I'm so sorry you had to go through that. Her behavior is absolutely unacceptable. It goes far beyond what anyone should have to tolerate. Her depression is not an excuse for being abusive.
Just like in my own family, I've stopped accepting emotional immaturity as an excuse for harmful behavior. Everyone is responsible for their own actions. For me, physical violence is a hard boundary. Once someone becomes physically violent, I can no longer tolerate that person. When I was a child, I couldn't stop the physical abuse because I was too scared. As an adult, one incident of physical violence ended when I instinctively hit back after a man hit me. I'm not saying that hitting back is the right solution—it was simply an automatic reflex. My hand reacted the moment he struck me. I also had nowhere to go because he kept following me until I was trapped with no exit.
After that, the violence stopped and it never happened again. Our relationship even improved later. I also made it very clear that something like that must never happen again, or we would be dealing with it through the police.
Years ago, when I finally told people outside my home what had been happening, they recommended that I take a self-defense course so I could feel safer and know how to protect myself. I never went because I don't like physical confrontations or violence. I would only ever use physical force as an absolute last resort, if there were no other way out and leaving wasn't possible.
Never think that there is something wrong with you. Through my own experiences, I've come to realize that a child loves their mother no matter what kind of mother she is. I struggled with that for a long time. I kept letting her back into my life, trying to trust her again, and every time she reached out to me, I immediately got my hopes up. But eventually, I grew tired of that cycle. First of all, you deserve respect and peace.