I think that you need to do special things for her. That includes messages like "you're awesome " and the like.
When it comes to cheering up someone who has went through a lot, the most important thing to do is to surprise them.. and to convince them of all the good things they have done.
Ask her to forget about her problems and remember that she can enjoy life by staying safe.
If people say bad things about her, then she should ignore them. People who aren't in her position don't get to say anything if they can't empathize and put themselves in her shoes.
It feels like you should also be more tender with her as people like her need a lot of love, care and warmth for their walls and barriers to be broken down. Once you've broken down the barriers which will allow you to really , truly help her out of this situations, it's going to be much better for her.
The key is to face everything with her, and to also remind her that she's worth it. Actions will definitely help.. just be there for her, and keep reminding her that you'll be there for her to count on.
I know people like your friend and she is likely an amazing person like you said she is.. the key is to eliminate any sense of self-doubt she has and to teach her to believe in herself.
Let her do things(SAFE things ) and try out new activities in order for her to build up and develop her talents... it'll be better for her .
Hang in there... this friend of yours is a keeper.
And if you need any more advice and wanna update us on the situation.. we'll always be here for you.
We ain't leaving.
Ever.