Venting?

Okay so I’ve been in a relationship for almost three years now, and I love him to death! We are currently long distance and it’s been really hard. He just came to see me for a week and it was the best week ever but when he went back home and everything was settled we kinda been drifting back to where we were before the visit. I love him and I wanna stick by him through thick and thin and it’s not becoming toxic or anything . I just find myself confused sometimes and very mad at things that take place. Just his attitude with me can be really sucky , or he’s just moody and I can understand it to an extent but sometimes it’s too much for me! I talk to him about it and nothing really seems to change til we’re in person and I kinda don’t know what to do. When I get really mad about it thoughts of breaking up with him crosses my mind , but after I calm down I know that’s not what I really want. But I don’t know how much more of the moodiness and outbursts I can take from him because it’s starting to become extremely tiring . Any thoughts ? Positive feedback only please . Maybe it’s something I’m doing?