You’ve made your career a top priority. You strive for excellence and may have even made sacrifices to advance in the workplace. When life throws you a curveball, it can be challenging — and somewhat disorienting — to stay on track. Major life crises, like a family member being diagnosed with cancer, financial troubles or other life events can (rightfully) consume a lot of your time and attention.

If you find yourself in the midst of a difficult time, it may seem impossible to carry on as a top performer at work. At the same time, you know it’s important to keep your career on track, not to mention maintain a semblance of routine and normalcy through the rough patch.

How do you balance a career and a personal crisis? Here are a few tips to navigate the workplace:

1. Think before you share

It’s important to find support when going through a tough time, but before divulging the details to those at work, think about the benefits and drawbacks of sharing. If you’re experiencing health issues, for example, may want to disclose some specifics about your situation to your boss and team, since you may require time out of the office for doctors’ appointments.

Take your workplace culture into account. For example, if you have the kind of work environment where everyone’s personal life is an open book, it may feel natural to share more about what’s going on. If your office is uber professional, it may be more culturally appropriate to only disclose details through a formalized process that involves approaching your manager or the HR department.

If you do opt to share details, your colleagues may offer advice or ask questions. Decide ahead of time what you’re willing to discuss and what you’d rather keep private.

2. Set boundaries with family

To successfully manage a crisis, you have to know when to set limits — even with the people closest to you. Relatives and friends may want to reach out to you during working hours. Let them know whether or not you’ll be able to respond at work when they can reach you or what types of emergencies they can (or cannot) interrupt you with.

3. Take care of yourself

Any type of major change involves grief, and how you deal with that sorrow will ultimately determine how quickly you bounce back. Don’t be afraid to take time away from work to cope and work through your loss. Consider working from home if you can. Prioritizing self-care is crucial when you’re experiencing turmoil, and your professional life will benefit in the long run. You’ll return to work rested, more emotionally level-set and better prepared to make good judgments — both on the job and back at home.

4. Practice self-compassion

A personal crisis can throw off your focus, so don’t berate yourself for not being productive enough. Accept that it’s only temporary and do what you can within your current limits. Plan ahead as much as possible. Breaking projects down into small, manageable and easily attainable milestones can help sustain your focus when you’re short on mental energy. By making progress on your goals, you give yourself a shot of positive reinforcement that encourages you to stay motivated throughout the day.

5. Tap into your benefits

Your company may offer benefits to help ease the financial and emotional burden of going through a crisis. Many organizations offer their employees childcare, coaching, legal services or counseling. You can also explore negotiating the terms of your employment and asking for certain accommodations that would help you be more productive, such as working remotely while you visit family or having flex hours for a few weeks.

After going through a crisis, you really learn a lot about your strengths and abilities. Pace yourself. Take every day one step at a time.