For me it's all about luck and maybe our characters build. Gwydian movement choice is totally random, therefore even if you will heal him a lot and keep giving him armors, he's gonna die if he does a few wrong moves.
I've saved him without any problem on my first playthrough, but second time with Lone Wolf talent i've loaded the game like 10 times until i was able to save him.
On my third playthrough i just... ignored him totally, later i've robbed Hannag and then also killed her and got a lot of cool books off her corpse. Yeah i know, i became so rude on the third playthrough
But i didnt like the fact that she takes away Pet Pal upon teaching, so i just used other teachers to get more source points and Hannag became kind of useless at this point though.
Love the freedom of D:OS 2.