It is very hard and worrying to care for someone who has depression or a similar illness. For a start it is difficult to work out if the way things are is because of the depression or if in fact the relationship itself is not working out. It is really easy to doubt oneself and think the other person has lost interest.
When I've been down with depression I've wanted to be alone, had no energy and became very withdrawn, and rather bad tempered and impatient too. I've tended to lose the track and not know if I loved someone, or even if I was still capable of loving anybody. As I improved things got better and my original feelings resurfaced.
I know you said your friend was seeing a therapist however his current treatment may not be as effective as it should. Talking of dying is a pretty big warning flag after all. Do you think you can encourage him to go back to his doctor and get is regime reviewed. You could offer to go with him, it just depends on how he feels about it.
If you don't think he would listen to you about seeing his doctor is there someone else he loves or respects who might be able to persuade him? This is probably the single most important thing to do right now. Apart from anything else it sounds as if his studies are suffering badly.
Letting him know you are there for him is pretty important, and can make a big difference. It can be hard however to know if one is pushing too hard or if one should back off and give him space. Perhaps asking him might be the way to go. If he is like me then he may not be consistent and you may have to simply rely upon your instinct.
I know from reading your other threads you are not in the best of positions yourself, an all this will add extra pressure - on top of your own studies. Is there anyone to support you , a parent or friend perhaps. Not being alone with these problems is a big thing