Hello and welcome to this site.
I lost my mum two years ago and didn't manage to find this site until well into the following year, but finding the support from the members here really helped me, so it's probably a good thing you have found it already. My mum spent the last six weeks of her life in hospital and I recall hoping against hope that she would get better, but knowing she probably wouldn't. I have since learnt that you begin grieving for someone even before they are gone when you know you are going to lose them and I cried buckets whenever I was at home knowing I wouldn't have her with me for much longer, so I am sure that's what I did.
I think all you can do is make sure you do everything you can possibly do to ensure that you will have no regrets after she is gone. Put her first and try to do whatever you can to make her last months/weeks as good as they can be in the circumstances. Don't be shy about telling her how much you love her and spend as much time with her as you can. Fight for her if you have to. Hopefully the medical team caring for her are doing a fabulous job, but don't be afraid to challenge them if you have any concerns.
This will probably be the hardest thing you will ever go through. I think losing a parent is one of the hardest things ever. Talk to her about the good times and take in photos to reminisce over. Laugh if you can. Hold her hand. They say hearing is one of the last senses to go, so keep talking to her even if you think she is sleeping. She may not be and might be reassured to know you are there. Let her know it is alright to go, when you think the time is right. If your mum is anything like mine, she will hold on so as not to distress you and wait to leave until you are not there. I am told this is common, but it broke my heart to know there was no one with her when she passed away. I had only left for a brief rest at home after spending all night at her side about half an hour before she died and have to live with the guilt of that, but perhaps it was her choice. I don't know. I just know I will always wish I had stayed longer.
I am so sorry you are both suffering like this. Be strong. Do whatever helps and talk to us whenever you need to. Sending strength and a huge hug. Thinking of you.