You are doing all the right things. You are a supportive friend. You are there for her when she needs you. You hug her when she wants to be hugged, and you don’t when she’s doesn’t. That’s what supportive friends do for the people they care about.
To try anything more would be ill-advised. You are not a therapist. Encourage her to consult a mental health professional. It’s possible that she is experiencing symptoms of a mental health condition such as depression or anxiety or other cause. It might explain her behavior and unspecified physical health problems.
In addition, encourage her to consult a primary care physician (PCP). PCPs often refer patients to mental health professionals when necessary. You might offer to accompany her to these appointments. She might feel more comfortable if you went along. Otherwise, you’re doing all you can. Good luck and please take care.
Dr. Kristina Randle