The unborn child is not "threatening" the mother. If the mother's life is at risk, it is not because she is pregnant, but because of complications arising from the pregnancy or other external factors. The complications and external factors need to be treated, and not by attacking the child, as if it is an agressor. No one ever died from simply being pregnant.
I'm gonna disagree with you here. The child does indeed pose a threat. The child, of course, is not at fault or culpable for the situation. Nevertheless, the threat is real. This is about the only situation I can think of where it is true, but one need not give up one's life in this type of situation.
Self-defense is legitimate.
SD