Pretty much everyone is capable of feeling love if they want it, I don't think that depends on your mental health or amount of pain. But it is a fact that a few things will generally make it incredibly EASIER to find someone you connect with, as well as to maintain the relationship in a
healthy way :
(1) Wanting to move forward and working towards that better place, potentially with that person, but it has to be for yourself first.
(2) A healthy balance between "relying on someone" for help when you're in pain and independency (I mean emotional independency if the pain is mental, but all the others too, I guess).
(3) Not being selfish with your pain and forgetting about the other person's feelings. Compassion for all, right?
(4) Taking care of yourself, having self-compassion. This is non-negotiable. :p
(5) Open and honest communication about the cause of your pain and what can be done about it, both by your partner and by yourself.
But don't let your thoughts/beliefs caused by your pain stop you from a potentially positive experience. I think it's the other person's decision (and right) to leave if they can't handle your pain for some reason, not yours.
Just a bit of advice on the top of my mind... I just drank lots of coffee and am on a roll to write some essays. It may all be debatable.