I agree with Chartreux completely. He has to help himself by seeking counseling or someone he can confide in other than you with these feelings. I was in a similar situation with my partner not too long ago. She would only talk to me about the death of her friend, her upset feelings toward family members and things that bothered her in the past. Because she was so dependent on me, she would get annoyed with me for going out or spending the weekend out of town with friends. It was odd to see that side of her, as I knew that wasn't who she was. She started slacking with homework and work responsibilities and only wanted to be around me when she needed sleep because she didn't want to sleep alone. It all started off just "needing me" a little. As her gf, I wanted to be there. She kept promising to get help, but never did and it only got worse.
I essentially was enabling that behavior, letting her think it was ok to avoid what she was feeling or thinking. We do not speak anymore and as far as I know, she has quit her meds and counseling. Do not leave your boyfriend, instead, encourage him to seek counseling. You must prepare yourself that sometimes, people are not ready or do not want help. So many people told me that I had to help myself before I can help anyone else and it's very true. It will be very easy for you to also fall into a bad place the longer you are around your bf. It's not anyone's fault, it just happens. It's a reality that our behavior doesn't only affects us, it affects many around us.
Be supportive, strongly encourage he seek counseling and continue doing things that make you happy. Whether it's a bubble bath, getting your nails done, taking a walk... keep your happiness alive also!
Good luck! It won't be easy, but anything worthwhile is rarely easy.