OP, you need to sit down, take a deep breath, be kind to yourself and accept that you have not ruined anything and neither has she.
She is ill. It's no different from if she had been in a car crash or had cancer: you would have accepted that this is a time of her life when you cannot make her exam results or her relationship to other people the priority. The priority here is keeping her alive and gradually supporting her recovery. You would not have tried to force her to care about other things while she was in a coma or weak from chemo, because you would have recognised that it wasn't a possibility at that time. But you would have watched for signs that she was getting better and then gently encouraged her to do a little more every day without feeling guilty or bad about the things she couldn't do. You would have accepted that recovery takes time. That's what you've got to do now, too. She is ill, she will recover, you will help her. It is not your fault.
She won't have scuppered her chances for life either. My dd was ill, physically and with MH issues at about the same age, got very limited GCE's and is doing absolutely fine as a young adult. She is at drama school, which is what she always wanted, she is living independently and though she has not recovered from her MH issues (and possibly never will) she has learnt to cope with them and adapt to them.
My son wasn't ill but decided half-way through Sixth Form that he was on the wrong course, withdrew after the first year and started in the first year at another college. Nobody is going to look at him when he's 25 and care about whether he left school at 18 or 19.
My dd, the same one with the MH issues, is just out of hospital with a totally unrelated illness, which they at first thought might be a brain tumour, then possibly encephalitis (thankfully, it wasn't either, nor motor neurone disease). If it had been, I think most people would take the attitude that things had to take the time they did and that any progress was good news. Looking back, I don't think her MH issues were any different. It doesn't mean I am not prepared to support her to stay active to get better- for one thing, she has to learn to walk again- but I won't blame her or anyone else (not even me) for her being ill.