HELP! my friend is in a toxic relationship...

so my best friend is dating this guy. and he really is a good person and treats her good. But he also suffers from depression, anxiety, and OCD as well as having a sucky home life. at first I didn't think that caused anything bad, until he told us one night about how bad his home life is. he got super depressed and would reject everything we said because he has no self worth. He does not care one single bit about what happens to him and all he cares about is the people around him to the point that it hurts the people around him to see him not trying to help himself at all. He also gets physically sick from being stressed. My friend ended up crying that night because of how he was talking like he was going to kill himself. Their relationship developed in them not really telling each other their problems because their feel that the other person doesn't need to be burdened until they argue about not telling each other things and then they do and they stress out trying to fix things. I myself stress out trying to help them. While all this is happening, my friend has had her grades slipping and has become more depressed lately. and yesterday she decided to do "put his school work above her own" (and woke up at 3:30 to do some of it) because he had a workload due the next day that he couldn't do because his dad had been yelling at him that night. And he told her not to do that again but she is adamant on doing so in someway to help him.

I don't know what to do, because she is the only thing keeping him happy (and somewhat sane and alive) but she is going in a downward spiral. I know if I told him to break up with her bc of what's going on, he'd do it a heartbeat at the expense of himself. but I'm scared that he will kill himself or shut himself off again like he had before he started dating her.

All while this is happening I am often put in the middle because I can't help trying to help people. So please give me some advice.

(also note- she's a junior and he's a senior. I know this seems crazy but honestly I'm just trying to describe 5 months into one text thing)