You can still be ok. Ok as friends for now at THIS point in time.
And if that changes again to dating partners at a later point in time -- then it is coming at a later, hopefully more stable time and not in a wonky time.
In the "ministry of presence" area -- it is commendable that you want to be a supportive friend and be there for him. Good on you!
Guard against these inappropriate things and keep it at appropriate level support and you could be fine:
1) Exhausting yourself. Burdens shared are lessened. Spread it around, dude. You can be one of the players, but you can't be his entire football team. Encourage him to speak to others -- a counselor, minister (if he has one), a parent or other relative, other friends, etc. It is ok to tell him "Dude, I am FULL UP. I need a break. I want to support you appropriately and I'm not good to you if I get no rest. Go tell someone else and then come back on ___ and tell me how that went. Spread it around."
2) Slippery slopes. Sometimes sharing emotional intimacy like that? Can lead to wanting other kinds of intimacies. Bluntly? Don't fuck with fragile. Firm but kind -- keep it in the friend zone until he is healed. Guard against your own attraction to him clouding your judgement on appropriate/inappropriate behavior for this time.
3) "Put me in the middle" stuff. Don't get caught up in triangulation. Do not allow him to go to her with crap like "Oh yeah? Well my friend (you) says..." He had to own his own baggage. We all do.
4) Taking it personally. Hurt people lash out and say all kinds of bizarre. Don't take it personally, but don't be a doormat. You can always say "I see you are hurting. I see you are lashing out. But don't aim it at me, please. I am here to support you appropriately. Not be your punching bag. I will listen. But let's try to find your healthy "I could do this" options rather than visit the unhealthy ones like lashing out." Remember you can always check out if it gets to be too much.
Choosing to apply the ministry of your presence means you are willing to share some of the burden. Not take it ALL. (I was just there yesterday supporting a friend who was acting out at me so I had to remind myself of the same things. Sigh. Hang in there!)