Sorry for your loss. The pain and confusion will be there as it’s just a part of the process.
At the end of the day if people could do better then they would, so don’t beat yourself up. Everyone has their struggles and a story (or stories) behind them. She did the best she could under the circumstances she ended up in, and maybe this was the best outcome.
Give yourself some grace and allow yourself to process as much as you can.