I recently visited a family who lost twins at 20 weeks after conception. It was probably the hardest visit I have ever done. What made it even harder was that it was family. The positive part of the experience was that the babies were baptized during their 40 minutes alive and their tiny foreheads had the mark of Christ.
Yet, what happens when babies are stillborn, miscarried, or even worse, aborted? These are tough situations and ones that we do not have a direct answer from Matthew 29 :-(. Here are the basics that we know from Scripture:
1) All of us are born and conceived sinful (Psalm 51:5) and have no hope unless God intervenes.
2) God intervenes by the power of the Holy Spirit to change our hearts and gives us faith (I Corinthians 12:3)
3) God uses baptism as a physical tool to give faith for regeneration and the work of the Holy Spirit (Acts 2:38, I Peter 3:21)
What this means is that our hope is always on God and His work. When a child is baptized after birth, we have the physical reminder that God has worked through it. So get the children baptized ASAP. Yet, when a child dies before baptism, we depend on God being with children in the womb (Luke 1:41) and loving all people through the blood of Christ. That is all we know and can trust in at that point.
May we remember our baptisms and trust in God's grace to the situations that are not quite so clear. Lord have mercy.