Instant health effect doesn't damage undead mobs.
Using the /effect command to apply instant health to undead mobs (Zombie, Skeleton, Wither Skeleton, Zombie Pigman and Wither) don't hurt them even if they are doing the hurt animation and sound.
/effect @e[type=!Player,r=20] 6 1000 255 1