I don't agree with the whole if you have low self esteem, or self worth, or anxiety, etc, you attract the wrong people (like attracts like) as if it's all your own doing. That's not really fair.
Most people suffer from some MH problem or confidence, self esteem issue etc (1 in 5 I believe) Most people you wouldn't even know either. So I don't believe people going through a hard time necessarily means you put out negative energy and attract the same back.
You could have extreme positive energy and have no current issues with yourself or your body, doesn't mean you're not going to interact in some way with somebody negatively, be that a colleague, a neighbour, or somebody on a dating website. And it doesn't mean it is all your entire fault.
Just my opinion.
I do agree I need to work on my confidence and self esteem but if it means until I do and get over it that I can attract good things in my life, well, then all of you suffering with MH issues god bless you...