You don’t want to end your marriage, but your spouse asks you for a divorce. It feels like it comes out of the blue. It’s stunning.

At first, you may feel shocked and then emotionally devastated. You could feel like your entire relationship was an illusion; you thought it was fine when it clearly wasn’t.

Much of the problem, experts note, is that you feel like you have lost control of your life. Things are changing, whether you want them to or not. You feel helpless to stop it or make your own choices. Things that once felt safe and familiar are simply gone.

At a time like this, the key is often to think about the ways that you can get control back. That does not mean saving your marriage, but it means controlling your life.

For instance, maybe you’re worried about seeing your children. Well, you do have legal rights as a parent. You can find out what steps to take to protect those relationships and ensure that you get a child custody arrangement that keeps you in their lives. You can focus on ways to make the transition go smoothly for them and you can look at tactics to strengthen your relationship with the kids after the divorce.

Your life will still change, but now you haven’t lost control. You have it again. You’re not helpless. You don’t have to simply sit back and watch as someone else makes these choices. Instead, you can use all of your legal options to control the life that you have and your future.