Lots of you gave great suggestions on how to not let your personal affairs affect your work life. Jemma84 suggested to "Put your cellphone in your bag on silent, drink an extra cup of coffee, and jump headfirst into a project that requires little critical thinking but is very absorbing."
However, if you're feeling really emotional, sometimes it's hard to control your tears even when you're in the work setting. Although my personal life was fine at the time, I remember tearing up on my last day at an internship, because I was really sad to see it end and to say goodbye to my colleagues. I had asked for a week's extension and was unfortunately denied because the company had a strict policy regarding the length of internships. Dorky but true: when HR told me they couldn't extend my internship for another week, I excused myself, walked briskly to the bathroom, and locked myself in a stall to cry. Not exactly my most professional moment, but I've learned to better control my emotions since then.
Have you ever cried on the job?