He’s not communicating

My bf goes through periods where he gets kinda depressed abt his life? I guess. Almost every time this happens he pushes me away. His texts r less and become dry, he gets easily irritated and sometimes mad at me. I’m 18 he’s 20, together almost 3 years. I love him and I want him to talk to me and not push me away and he knows this and yet does it anyways. Last time he had this phase which was a month or 2 ago he said that I don’t get it and that I don’t give a shit. Which is completely not true. Yesterday he told me he was staying off his phone and didn’t rlly talk to me the whole day. Today I’ve barely heard from him and decided to call but he purposely wouldn’t pick up. What should I do!? Ive given him his space but he still won’t rlly talk to me and when I texted him he said “I’m shutting off my phone.” It makes me feel like he doesn’t appreciate how much I care for him. I need more opinions.