Boyfriend issues:/

So, me and my boyfriend have been dating for awhile. For the past few months, he's been taking out everything on me. I honestly feel like I'm sticking around for those rare times he does treat me right. has anyone felt this way and how do you leave? I can't bring myself to leave