I need advice 🥺

My boyfriend and I have been dating for 2 and 1/2 years now. I’ve always known him to be a very moody person (we grew up together in the same neighborhood/school), however over the past year now he’s been taking his moods out on me. He goes from very happy high periods of being head over heels in love with me to ignoring me for days on end with no communication. I’m close to his family and they tell me that the days he’s ignoring me he just lays in bed and sleeps all day. He tells me that he needs to think about the problems we have and he doesn’t want to talk to me or see me. He always takes it to the point of saying he doesn’t know if he wants to be with me anymore or breaking up with me just to tell me he didn’t mean it the next day. This happens sometimes twice a month and the changes in mood happen for weeks long periods. I walk on eggshells every day because I’m always afraid that I’m going to say or do something wrong to trigger this happening, but at this point I’m starting to realize that no matter what I do he finds a reason to blame me and shut me out at some point in the month. He often goes through periods of time where he loves college and then decides he wants to transfer because he hates it.. he does the same thing with the sports he plays and activities he’s involved in, pretty much anything in life. He was diagnosed with depression almost a year ago and he took the medicine he was prescribed for a month and then stopped and said he felt he didn’t need it anymore. I honestly feel that he thought this because it was actually working for him. These mood swings he puts me through are severely effecting my mental health. When he ignores me I cry for days on end and can barely eat or sleep. We’re both 19 and I’m a pre-med student.. I’m going back to school next week. I don’t know if I should move on and focus on myself or what to do. I’ve spoken to his mom about this issue before as advised by my doctor who says he needs professional help. However, he doesn’t have a close relationship with his parents on a personal level. The only deep rooted relationship he has is with me and he doesn’t share anything emotionally with his parents. I’m afraid if I walk away that something bad will happen to him at one of his extreme low points. I truly love and care about him, he’s my best friend, but I don’t think I can be with him unless he gets help. I think he has a personality or bipolar disorder. Please let me know what you think 😢