Sending lots of sympathy (and to Sparklingbrooks boy too). Heartbreaking to see your child going through this.
Get her magazines to take into school at lunchtime, when there are no clubs on. Nothing worse than moping around wondering how to spend the lunchtime, trying to look positive in a vacuum. If she has a good mag in her bag which she can pull out and read (or even pretend to read, if she has already read it) then she will feel less at a loose end, and someone might join her to talk about/share what she is reading
Has she tried karate out of school? V good sport for improving self confidence, getting out and being with people twice a week, getting some exercise, without the social pressure of having to have friendships already. Because the class is working on activities which each person must do alone, you don't have to have a friend there to do it, but you are with other people who are doing the same.
Seconding the suggestion of ensuring that she has enough support/sympathy/empathy at home/on line to come to terms with her epilepsy. Any teen is working out who or what they are, and being diagnosed with something, even if it can be well controlled/managed, is a big thing to come to terms with. An online support group is a great idea.
My final thought is to encourage her to eat well at home (ds1 won't eat much at school for other reasons). Try a sandwich/bowl of pasta as soon as she gets out/home, and then have the evening meal a bit later if needs be. Eating is essentially a social activity - everyone enjoys eating more with friends. She can take a banana/sausage roll for 'lunch' to get a short burst of food onboard, and then enjoy eating at home . . . .
Best of luck. Things will get better, but it is hard whilst going through this