My mom suffered from the same thing.
She broke her hip about 2 months before she passed away and that seemed to make her memory loss even worse.
Whenever anyone came to visit her during her rehab she'd ask if they'd seen, or heard, from my father who had passed away 6 years before.
She must have relived my father's death about 20 times a day for the last two months of her life.
I was very happy and relieved for her when she finally passed away.
No more pain, physical or emotional.
Actually, it was complications from pneumonia that finally claimed my mum.
She crashed, rallied, crashed, rallied, crashed...
She developed pneumonia - literally overnight - on the night of December 9-10 - we had to call a doctor at 5 a.m. and I decided there and then, that I wouldn't admit her to A&E (ER in the US); she would have been distressed and frightened and I couldn't do that to her, and even if we had managed to obtain a bed within a day or so, she would still have been in an alien environment, with little privacy or dignity, which would have been very distressing and upsetting for her.
But that meant, that when the time came, the choice of where to treat her lay between either home or the hospice; in fairness, during the last two days, the hospice did offer a bed, which I declined, as it had been pointed out to me that she might not survive the journey there in the ambulance - again, why subject her to that degree of stress?
Instead, we (doctors, nurses) treated her with nebulisers, antibiotics, steroids, and much else; she rallied, crashed, rallied and crashed.
And then, it was explained to me that she mightn't - and most likely wouldn't - come out of this; the conversation (over a period of two days) - this was December 20-21 - changed from saying "well, she mightn't make the new year", to "she mightn't make Christmas", to - "well, she is unlikely to last 48 hours", which became "she is unlikely to last 24 hours" - that gave rise to two further conversations - was I prepared to have her die at home? (I was, as long as adequate support in the form of a hospice nurse was in place) and would I permit the use of morphine to ease matters (yes, of course).
So, she died at around this time (23.45) on the night of December 21, surrounded by myself and my two brothers, we were each holding her hands - one brother had arrived with less than ten minutes to spare - the dedicated and devoted carer, and the hospice nurse, with ABBA playing gently in the background (she loved ABBA), just after I had said to her - "we are all here now", for the second time.
She had cocked her head - listening closely - when I first said it, and I then repeated it, firmly, as I felt she was waiting for something such as that; I couldn't bring myself to say "you can go now", but I did think that letting her know that we were all there - she was clearly holding on until my second brother appeared - was something she needed to be told.
She huffed a little, breathed out, and that was it.