Seperation...Sadness???

My boyfriend and I have been together for a year and a half. I used to just joke around about throwing a fit when he has to take me home before curfew, but now it’s real. I actually get depressed when we have to leave eachother and that makes him sad that I’m sad. I don’t know how to solve this or what exactly this is. I also tend to self sabotage. Like in my head I think about things in my future like cheating on exams in college and I see them as temptations I won’t be able to resist even though I know it’s wrong. Helppp