How do I stop my personal problems from affecting my work?
When your life outside is coming apart, it does not stay outside. It follows you through the door and sits at your desk. That is not a character flaw. You are one person, not two, and a person in pain carries it everywhere until it eases. You do not have to hide it perfectly, and you do not have to let it run everything either. There is a middle path: name to yourself what is happening, so it stops ambushing you, and then decide what one part of work still deserves your care today. Protect that one part. Start by lowering the bar honestly. Do the essential things and let the rest be good enough for now. Tell someone you trust, even briefly, so you are not sealing the pain in silence. This season will pass. Your job right now is only to get through it without breaking yourself.