First let me say my heart goes out to you and your wife in such a worrying situation. You will be in my prayers.
If a newborn is in danger of death, the child should be baptized immediately. If no priest is readily available, any layperson can baptize using water and the Trinitarian formula.
If the unfortunate should occur and the child dies before receiving baptism, there are other Rites of the Church that would apply. The Book of Blessings contains an Order for Blessing of Parents After a Miscarriage. The Order of Christian Funerals contains prayers that can be said in the presence of the deceased’s body that can be adapted for infants and also contains prayers explicitly for deceased children that can be used immediately following a death.
As regards children who have died without baptism, the Church can only entrust them to the mercy of God, as she does in her funeral rites for them. Indeed the great mercy of God who desires that all men should be saved and Jesus’ tenderness toward children which caused him to say: “Let them come to me, do not hinder them” allow us to hope that there is a way of salvation for children who have died without baptism (Catechism of the Catholic Church 1261).