Boyfriend trouble

Two days ago I went to my boyfriends house who I'd been dating for over a year. As soon as I got there he started kissing me really roughly, he'd never been like that before and I wasn't sure what was going on. He started trying to take off my shirt and I told him to stop but he just shushed me and kept going and doing that till he had my pants off. He stuck his hand in my underwear twice even after I told him to stop and he only stopped after I told him he was hurting me the second time. Then he started taking my hand and trying to put it down his pants because he wanted a handjob and after two hours of me trying to pull away from him I just gave in to get him to stop. Once I got home I was so confused and shocked that I didn't do anything and he broke up with me this morning and I don't wanna think of the stuff he said because it just gets me upset.