Why am i being so stupid ?

I’m currently in an abusive relationship, and i don’t know how to leave. My boyfriend is an asshole, he has serious trust issues and lacks with communication. I had to delete all of my social media because he thinks I’m a slut, and talks to other guys. That’s not the case, he knows my password to my phone, so I’m not hiding anything. Every time i make a mistake he yells at me and calls me names. I have so many bruises on my arms and legs from him punching me, just recently he spit in my face and that hurt me so much. I was disgusted that someone could do something like that to someone they “love”. I know this is healthy and it’s eating me alive, i don’t know why i keep coming back. I know myself that i should leave before things get even worse, i just don’t know how. I feel completely lost guys. He’s a good guy but i know he’s not going to change his ways.