you do the best you can given the ability and resources you have.
Thereafter do not brood over the consequences
Resolve to find measures to prevent future occurrences
If you are unable to do the above, then you are the one who is having a serious problem and thus will suffer for it.
So the critical problem is not John or Mary - either the dead baby or Mary being forced to give birth, or how it effect others,
rather,
the problem is on you to learn how NOT to have the above attitude [worry to death sort of] so you can avoid sufferings.
Once one have done one’s best, one should avoid crying over spilt milk.
If one cannot overcome the above, then one will end up suffering all the time.