Actually, you know, you're doing great.
Because you've created a family where your son is allowed to express his distress to you.Being so upset, and letting it out to you, is safe enough and 'allowed' for him.
Okay, he's not being very mature, or fair, but , you know what? he's twelve, and has some hormones swirling around, and he loved his grandad, so I think we can let him off being mature right now.
He's angry, and verbally lashing out. Very hard for you
. But, he will probably see this diferently, soon. Maybe even apologise.
You have done your best. Don't accept blame from him: you cannot foresee how these end days play out- none of us can . Equally, try to accept his anger, without blame and without taking it on board.Because there is often a lot of anger mixed in with grief.
Sorry, didn't mean to sound preachy. I really do wish you both all the best.
Don't forget to allow him to see how upset you are, too.