How do I break an unhealthy relationship pattern?

I want a secure relationship with someone that wants to be with me and who will actually put effort into it. I seem to gravitate toward unavailable men and those that want intimacy and no relationship. I let men dictate and control me because they accuse me of being controlling. I let men emotionally abuse me and I am at their beck and call. I am not comfortable being alone or doing anything by myself. I feel I need the security of someone being around just to survive. I know what I'm doing wrong and I do it anyway just hoping things will change. How do I stop this behavior and thought process?