boyfriend is depressed(TW)

I need some help. So my boyfriend and I of almost a year have both had it rough and have been able to somewhat heal each other and learn to grow. Right now he’s going through stuff that he won’t tell me about, which is okay. He mentioned self harm (like punching) the last time he talked about this type of thing and I don’t know how to help him. It breaks my heart because he seems so okay and then he’ll just shut down and I feel like I can’t help him. I can’t think of what I can do to help, any advice?