Life doesn't stop once you clock in. No matter how hard you try to keep things professional, sometimes personal matters just get too overwhelming to let you do your job. First things first: Don't be ashamed that you deal with human vulnerabilities. Whether you're dealing with something huge now or you just want to be prepared, it's worth knowing how to help your employer help you through a really tough time.
It's better for your boss to know what's up with your performance, rather than guess. Be transparent about what you're dealing with, though you don't need to overshare — just explain what's hobbling you at work. Anything specific about duration or what you'll need to do your job will help you make your case, but if everything is just one big mess, that's okay to say too.
This is valuable for managers too, especially if no one has trained you for it. You may react on a personal level to a colleague's distress, but as a member of company hierarchy, you also need to keep your own duties in mind. Make sure you have a good relationship with all your team members, so they'll feel comfortable talking when something big comes up. When you have real communication, you can get more done for both of you.
Most important, be able to listen for what an employee is really asking. If someone is going through a serious illness or needs to become a family caretaker, figure out how to afford them workplace flexibility, especially if a stressful situation has no fixed end date. Remember that while you expect a standard of behavior at the office, displays of emotion are often about fear or anger rather than an attempt to manipulate you. Finally, establish a routine with check-ins that allows the employee some control and dignity. The whole office will be watching how management handles personal crises. Give everyone the comfort of knowing it can be done sensitively and well.