Hullin, Chapter Four, Mishnah Three
This mishnah continues to deal with ramifications of the notion that a fetus within its mothers womb is considered to be a limb of its mother and not a separate life.
1) If a fetus died within the womb [of its mother] and the shepherd put in his hand and touched it, he is clean, whether it was a clean or unclean animal.
2) Rabbi Yose HaGalili says: if it was an unclean animal he is unclean, and if it was a clean animal he is clean.
3) If the fetus of a woman died within the womb of its mother and the midwife put in her hand and touched it, the midwife is unclean for seven days, but the mother is clean until the fetus comes out.
Section one: A nevelah, an animal that died without being slaughtered, is unclean. However, the fetus in its mothers womb is not considered to be a nevelah. This is derived from a kal vehomer (a fortiori) argument. If a clean animal is slaughtered and found to be pregnant, her fetus can be eaten based on the mothers valid slaughtering. It is not a nevelah. All the more so, a fetus that dies within a live mother is not considered to be a nevelah, because its mother is alive. According to the first opinion, this is true of both clean and unclean animals.
Section two: Rabbi Yose HaGalili says that there is no kal vehomer argument when it comes to the unclean animal because when its mother is slaughtered, the fetus does not become fit for eating. Therefore, it has the status of nevelah even if it died within its mothers womb.
Section three: If the human fetus dies within its mothers womb, and the midwife touches it while it is still inside, the midwife is unclean for seven days, as is the rule for someone who comes into contact with a corpse. According to the Talmud this impurity is not deoraita from the Torah, but rather is a rabbinic decree. From the Torah, since the fetus is still in its mother it does not count as a separate life. However, the rabbis decreed that it should make her impure lest she touch it after its head has already emerged.
The mother is considered clean from corpse impurity unless the head emerges and then the baby dies.