I'm sorry you are having a difficult time. Your description of feeling like you have lost your mojo reminds me of myself several years ago. I too lost interest in just about everything, had no sexual spark, work was tedious and I felt trapped. This is when my relationship with Beaker started to fray.
There was a lot going on in my life that contributed but part of it was that my hormones were fucked up. Hormonal issues can cause what you describe experiencing or they can make a difficult time in life worse by eroding physical and emotional resilience. Have you had your hormones checked? Men go through hormonal changes too. Just a thought and I wish you the best.