(19) I call heaven and earth to witness against you this day, that I have set before thee life and death, the blessing and the curse; therefore choose life, that thou mayest live, thou and thy seed;
(22) And if men strive together, and hurt a woman with child, so that her fruit depart, and yet no harm follow, he shall be surely fined, according as the woman’s husband shall lay upon him; and he shall pay as the judges determine. (23) But if any harm follow, then thou shalt give life for life, (24) eye for eye, tooth for tooth, hand for hand, foot for foot, (25) burning for burning, wound for wound, stripe for stripe.
Antoninus said to Rebbe At what point is the soul given to a human? Is it from the moment of decree [that such a child will exist], or from the moment of formation? He responded: "from the moment of formation." He replied, "is it possible that a piece of meat can last for three days without salt, and yet not become rotten? Rather it must be from the moment of decree." Rebbe said: "This thing that I learned from Antoninus, and there is a supporting verse: [Job 10] Your Providence has guarded my soul."
מתני' גהאשה שיצאה ליהרג אין ממתינין לה עד שתלד האשה שישבה על המשבר ממתינין לה עד שתלד האשה שנהרגה נהנין בשערה בהמה שנהרגה אסורה בהנאה: גמ' פשיטא גופה היא איצטריך ס"ד אמינא הואיל וכתיב (שמות כא, כב) כאשר ישית עליו בעל האשה ממונא דבעל הוא ולא ליפסדיה מיניה קמ"ל
Mishnah: If a woman is about to be executed, one does not wait for her until she gives birth. But if she had already sat on the birthstool, one waits for her until she gives birth. If a woman has been put to death one may use her hair; if an animal has been put to death it is forbidden to make any use of it.
Gemara: But that is self-evident, for it is her body! It is necessary to teach it, for one might have assumed since Scripture says: According as the woman's husband shall lay upon him, that it (the unborn child) is the husband's property, of which he should not be deprived, therefore we are informed (that it is not so).
(6) A woman who was having trouble giving birth, they cut up the fetus inside her and take it out limb by limb, because her life comes before its life. If most of it had come out already they do not touch it because we do not push off one life for another.
Responsa Tzitz Eliezer 13:102
It is clear that in Jewish law an Israelite is not liable to capital punishment for feticide.... An Israelite woman was permitted to undergo a therapeutic abortion, even though her life was not at stake.... This permissive ruling applies even when there is no direct threat to the life of the mother, but merely a need to save her from great pain, which falls within the rubric of "great need." Now, is it possible to imagine a case in which there is more need, pain, and distress, than the present one, in which the mother is confronted by the [prospect of a] suffering child whose certain death is only a few years away and nothing can be done to save it?