I am very sorry for the tragedy. If you have adopted from a rescue, please complain! I am so sorry that you have found us too late to do the sexing upon arrival... not that it would have made any difference but you would have had a chance to be better prepared.
Please open an ongoing support thread in our specially monitored pregnancy section (which is only visible after you have registered) so we can help you with sexing the baby, the companion and help you work out the best way forward in your specific situation.
Here is our baby and mother care advice, including sexing and when to separate male pups:
Pregnancy & Baby Care Guide's
Sadly even babies can suffer strokes or heart attacks out of the blue. Mothers can often sense if something vital is wrong with a pup and refuse to accept it, but sometimes death comes sadly without notice if there is a genetic time bomb in the body.
Here is our grieving information, which you will hopefully find helpful in the coming days and weeks:
Human Bereavement: Grieving, Coping and Support Links for Guinea Pig Owners and Their Children
You may also find our new owners guide helpful as a resource as we are addressing specifically all the areas we get the most questions and concerns about and have a number of guides that help you learn what is normal and what not:
Getting Started - New Owners' Most Helpful Guides