I need help

Okay so my friend (13M) is struggling and I've been trying real hard to help him. I've been supportive and all, sometimes I feel like neglecting my own struggles to help. But it feels like it's still not enough, he keeps telling me that he's going to overdose, and he keeps doing it in a joking way. I'm really concerned and I feel so helpless. No matter what I do or say, nothing convinces him.

Earlier I told him to promise me not to overdose, he said "no promises" with a smile.

I couldn't sleep at night, but if I did I had nightmares about him ending his life.

I'm so worried for him. What can I do...?