Oh, I do feel for your daughter, as this was me many years ago. Same situation - I was at uni, terrified of telling my family, and went into a state of utter denial - my mental health was atrocious at the time. Looking back on it now, I hardly understand myself. I was a walking zombie. I couldn't make good decisions for myself and so desperately needed my parents help. I thought I was mature enough to go to uni on another city, far away from my family, and I wasn't. I had no clue how to help myself and couldn't do it alone.
I don't underestimate how hard it is for you, either - it must have been a huge shock, and you're trying your best to help her now, which is wonderful. I will be forever grateful to my parents. I didn't go back to uni for a year - I moved back with DD, and although my mum was always there if I needed her, it was made clear to me at that time that my priority was taking care of DD. Uni could wait. It was too much for me to do both. My mum tried her best to make sure I enjoyed the early days as much as possible. She organised professional photos, bought me scrapbooks, and organised counselling for me, which I desperately needed.
And fifteen years on, I've never been happier - it could have been so different if I'd been left to my own devices, but my mum knew I was in no state to make good decisions and made them for me.
I suppose I would recommend counselling as a priority, and perhaps putting uni on the back burner while she adjusts to being a mum, if that's an option? I would say perhaps her actions seem selfish at the moment, but she's struggling underneath, still in denial and can only carry on as she did before, as she doesn't know how else to cope - I know it sounds bizarre, but that was my thought process at the time. That I could just pretend nothing had changed.
All the stress and unhappiness I put my parents through, and they still pulled me through the darkest time in my life - your daughter and granddaughter are so lucky to have your love and support.