As someone who has been on both ends of a similar situation, I can definitely feel the struggle there is when you want to help, but don't know how to. Sometimes it may be too personal for them to talk to you about, and they might not accept help from you in those times. If that's the case, then the best thing that you can do is be a support. Express your concern to them, but don't try to solve the problem. Not overbearing, and not distant, but making it known to this person that A: You are there to support them fully, and B: if they do not want your support, that you will always be an option if they ever do. It's about letting them come to you*. If you are someone in this person's life that can make a greater impact, then I recommend researching therapists in your area that may meet criteria that this person needs. Then showing this to them, and helping them get what they need are the next best steps in these situations. I can really relate to how stressful it is when someone close to you is struggling, AND I can tell you how emotionally taxing it can be to take on their problems, or become their surrogate "therapist". It's not healthy for you. I'd say that not getting directly involved in whatever it is is the most supportive thing you can do for your friend. It keeps you neutral.
*This is a side note on the times when you SHOULD intervene/call for help/go to them. If this person is struggling with self harm thoughts, suicidal/homicidal thoughts or tendencies, or if you suspect that they are at risk to their own safety or the safety of others around them. If these are the cases, GO. TO. AN. AUTHORITY. I'm sure you've been told this before, and it's still really important. Go to a parent, guardian, spouse, etc. for help on what to do about these concerns. When in doubt, call emergency services.
Stay strong, and remember to take care of yourself too! I'm hoping for the best.