Broken up & living together

My boyfriend of 5 years broke up with me a week ago and unfortunately we live together. Our lease doesn’t end until September. He says he still loves me but he’s been struggling with his mental health for awhile & he wasn’t communicating that to me. I was blindsided since we were talking about our future. Communication has been restricted to just us letting the other know when they will be in the apartment and vice versa. I’m trying to maintain space. Honestly, I just need some advice to get through what I’m going through. It’s hard not to cry when he’s in the other room.