Serena Williams was shocked that she was pregnant. So shocked in fact that she didn’t believe the first positive test. “Oh my God, this can’t be” she said. “I’ve got to play a tournament.” Five more pregnancy tests later, she was convinced, but had a hard time imagining the future. In her Vanity Fair interview at six months pregnant she still feels “it just doesn’t seem real…I don’t know what to do with a baby.”

An unplanned pregnancy can shake you to the core, even if you’re not a world class athlete disappointed that you won’t be competing (and probably winning) at Wimbledon this year. The reality that you are going to be a mother can feel abstract, especially since it takes nine months for the baby to show up. Here are a few tips to keep your sanity if this happens to you:

Give Yourself Emotional Room

Deciding to continue with a surprise pregnancy doesn’t mean you will immediately have all positive emotions. You may be stunned, scared, and unsure of yourself. You may need time to adjust to the fact that your long-term future is going to be very different than what you planned.  Give yourself permission to feel all these things. It doesn’t mean you’re selfish or going to be a bad mother. It’s reasonable to spend some time mourning the future you thought you were going to have. Women can feel pressured to only express positive thoughts about the prospect of having a child. It’s okay to feel a full range of emotions in response to this surprising and all-encompassing change.

Give Room To Your Partner Too

If you’re going to be raising this child with a partner, that person’s life is up for a pretty big upheaval too. For men, making the transition to fatherhood can feel like a massive weight that has been placed on their shoulders. Yes, many women work today, but the ability to provide financially for the family is still very central to a man’s identity. If he is worried about this, or about being a good father in general give him the space to express that. It is probably unrealistic to expect a man to be immediately completely ecstatic about an unplanned pregnancy. If he is on board with having the baby then he is halfway there. He just may need some space to explore and discuss his emotions about impending fatherhood.

Take Care Physically

If your pregnancy is a surprise, you probably haven’t spent a lot of time thinking about how your health habits can affect a baby. There’s time to figure out where you lie on the debate of whether a pregnant woman should eat sushi, but there are a few things you do need to avoid from the start. Smoking, drugs, and drinking. All of these can cause serious life-threatening consequences for your baby.  Smoking can make you deliver a baby pre-term and at a low birthweight. Drugs (recreational or prescription) can cause a variety of birth defects. With prescription drugs, it’s imperative to ask your doctor if they’re safe while pregnant. Excessive drinking can cause fetal alcohol syndrome which involves lifelong physical and mental disabilities for the baby. If smoking, drugs, or drinking are part of your lifestyle, this is the time to get help to stop.

You Can Keep It Private Until You’re Ready

You are not required to tell anyone. Once you’re showing it will be tough to hide the bun in the oven, but until then, you can adjust to this new reality without the whole world watching if you want. Many people wait until the first trimester is over to go public, so you should feel free to take your time. When I found out I was pregnant with my second child, my first was going through a particularly difficult phase and I had a hard time imagining how I was going to cope with two. I waited several weeks to tell anyone, so I was able to get a hold of my bearings without the pressure to project complete joy at the prospect of having a baby and a toddler to take care of.

It’s tough to imagine a more life-altering change than unexpected impending parenthood. Even the uber confident Serena Williams was shaken by the prospect. So, if you find yourself facing a surprise plus sign, give yourself permission to take care of yourself, your baby, and your partner before you worry about the rest of the world.