It's a heart-wrenching story. Thank you very much for sharing. And I hear you. After something like losing a family member, it is a serious understatement and beyond tone deafness to say, "It could've been worse". It is extremely insensitive.
If I were to give your friend the benefit of the doubt, it might just have been a clumsy way to lessen your pain or to empathize while feeling awkward or not sure how to deal with the situation.
Not meaning to judge her or anyone, I think I would just say, "I'm here for you." But I guess it's easy for me to say until I'm there, too.
I hope it gets easier for you with time.
Thank you and best wishes.