You can resurrect someone with a scroll or spell, and at least during the alpha there are automatic resurrections in certain circumstances. If you link the dead character's portrait to the live one and take some stairs, etc, it will move the dead character's body, as well. There is a flee button you use in combat that teleports you to safety (it isn't guaranteed to work, but at least in the alpha it worked every time I tried it). Depending on your characters' constitution, speed and skills, you may be able to outrun opponents, or at least lead them towards soldiers that can help you.

Both main characters dying should be game over, but so far in the alpha a surviving companion can resurrect them.