Boyfriend broke up with me over sex?

My boyfriend and I have been dating for 3 years. Our relationship hasn't been the greatest due to stress so we haven't been having much sex. Last night we were kissing and I kissed his neck to hard and he thought I was giving him a hickey so he slapped my face. After he slapped me I really wasn't in the mood anymore so he started screaming at me and then broke up with me. I feel bad because we haven't been having much sex and just need opinions on whether or not I should try to get him back or not.