I’m losing my happiness

Sorry this is so long. So I’ve been in a relationship for 4 + years & idk if I’m even happy anymore. I’m 22. & he’s 23. We have our own place together. & we have 3 dogs together. our relationship has always been rocky but then super super good at times. recently, he’s been getting mad at me. & I feel like I am the one that starts it. but idk how sometimes .. last night he went out with some friends though & I kinda got upset because all these “guy friends” do coke & drugs & they are single. he’s lost a job before because of doing coke with them. it annoys me. & he’s cheated on me once while he was with them before .. I did forgive him. but I never forget.. well last night he went out. And I downloaded a tracker on his phone (I know, I was wrong.) I was nervous he was gunna cheat. but I was also nervous about him driving & it’s a Saturday night. & I didn’t know if he was gunna drink. or do drugs. or whatever. & he speeds. on the app it tells you where he’s at & how fast he’s going. I kinda hid it from him & today he found it while at work. He got mad at me. told me he’s done. that I’m insecure. & annoying. & I’m annoying. & I don’t trust him. & he feels like I haven’t trusted him & he doesn’t know what to do about it. because it’s annoying him. . I tried to explain why I did it. & idk why i hid it. he came home & hasn’t talked to me since. he goes on his phone & doesn’t talk. I understand. Everytime I try to talk too him about anything. he has an attitude or gets mad at me. & then I’ll tell him I’m really sorry & he’s like shut up. why do you always have to start stuff. it’s fycking annoying. idk. I haven’t felt happy in awhile .. & if I talk about it ... he’ll get mad at me. & tell me “I knew you’ve been done for awhile, it’s cause you found someone else”. Idk what to do.