There is a way to
Revive dead NPCs, if you are comfortable hex editing, or willing to try it.
I generally tried to clear around friendly areas before entering, though that was so guards wouldn't 'steal' any of my experience points if hostile creatures came too close. In any case, I didn't have any problems with NPCs getting killed.