How to forget the suffering

How do you all try and forget the suffering your loved one went through when they died? My mum was really ill and was in hospital for 4 months. She was ill but got worse in hospital, partly the hospitals fault. It was horrific. Then she had to go to a horrible rehab place and she was in so much pain, so depressed and so unhappy. She told me at one point when she wouldn’t speak and turn and face me from her bed that she feels like her life had stopped. I hate myself for letting go there, and for having to leave her alone when she was so so unhappy and ill. I am still having nightmares about it and I lost her September 2022. I lost my temper with her too and one day that she was in rehab and walked out. The pain of remembering and the guilt is still weighing me down and devastating me. I know people very rarely pass away in their sleep peacefully but how do you all cope with this? I feel like I let her down, it was my job to protect her, be with her, make sure she want alone and in pain and she was. I hate myself for it. I hate that she suffered and was so unhappy