I'm sorry but you are YABU, but I do understand your MH issues are a major contributing factor to that.
You say yourself, that these issues you have do impede on your ability to live your life fully.
Surely as a parent you don't want the same life for your DD by extension?
You really do need to access help via your GP to address these problems, not only because you owe it to yourself and DD, but also because as you say you are now split from your partner.
I do think it's a blessing where you are concerned that he's still living at home. Because in all likelihood, if he left he'd take DD with him. I know I would.
It's probable that he is staying on at home mainly for her wellbeing, so that your MH issues don't impact on her right to live life fully, ie. having breaks, trips into town, picnics in the park etc. Just regular things that she has the reasonable expectation to as a child.
Please do strive to make getting help your priority.
Because if he does leave while your mental health hasn't improved, there's a very real possibility that Courts would award him residency, due to the fact that in a house alone, your MH problems would directly impede on your ability to offer her the childhood she deserves. Right now if he left, it would possibly be in DDs best interests to go with her Dad.
Unless XP purposely intended to set off negative emotions every time you left the house, he did not 'make you agoraphobic'. That is something that has spiralled in your own mind.
and wishing you strength and good luck with addressing your problems. I'm the child of someone who had chronic MH issues while I was growing up, and it was a very vulnerable place to be when she was having a particularly bad day. Remember, other people may trigger symptoms but nobody is responsible for your MH but you. If you continue to blame your XP for not being supportive enough then and that has 'made you worse now', then you are dwelling on looking backwards. If your head is focusing backwards you'll never look go forward. Focus on the future instead.
Good luck OP.