Excellent post by Jester.
She starts by acknowledging that she has a problem and that she is the one who needs to fix it. Then she should start to see a psychologist so that she can unpack her issues and learn how to cope with them. Medication may also be very helpful.
Also, she needs to be aware that the first psychologist and/or first meds may not be a perfect fit. Sometimes it takes a couple of attempts before finding the right solution.
In the meantime, you need to keep your own boundaries solid. This business of her wanting you to go to class when sick is not OK. No matter how much she cries or begs, you need to stand your ground. You also have to find the line between supporting her and giving positive reinforcement for her behaviour. At present, she'd be getting a lot of positive feedback from her behaviour...which means she will keep doing it. There is a time for saying "you need to make different choices" or "you are being unreasonable" or "you need to seek professional help because I'm out of my depth" or "this isn't just about you". If she's upset about losing friends, she needs to understand how her behaviour is driving them away.
This will be a tough journey for both of you.
Never regret anything that has happened in your life. It cannot be changed, forgotten or undone. So, take it as a lesson learned and move on.