Personal Life Affecting My Work Life

My personal life is currently going through some problems and these feelings and emotions have reached a point where I am now being incapacitated in my work, now matter how much I coach myself I keep getting the thought that “I cant work or I don’t feel like it”
I am torn between the 2 thoughts where my brain says I need space and time and the thought that my personal life should not be a problem that interferes with my work.
How can I go about solving this?