I'm so sorry to read about your loss. I think you made the right decision to trust your doctor. I would too if I was in the same position. He is after all the expert, not your mother in law. I think at 17 weeks it's quite clear when there is no heartbeat. dont't beat yourself up over it.
I'm not a religious person but I believe everything happens for a reason. We may never fully understand why, but we must never lose hope.
Grief is part of the road to recovery. dont't keep it pent up. I wish you all the best.