I think you have identified the first 'loop': feeling rejected which is balanced by the urge for being wanted and loved. This is of course one of the most basic human predicaments. It is natural to crave closeness and relationships but it is easy to get caught in the trap of thinking the closeness will fix the loneliness. It seems to work for a while, but then the loneliness comes back and we blame the relationship for not have met our expectations. The aversion is to the rejection/loneliness and the attachment is to the idea of closeness. To break the syndrome, you become aware of how you are being driven into compulsive attachment syndrome, and try to ease up on it. Don't be so compulsive about finding the positive; cultivate independence. Then, process the negative feelings of loneliness which have probably built up in the subconscious and are driving you into an excessive compulsive hunger for closeness. As the suppressed negative feelings of loneliness are released, you won't be so fixated on finding outside closeness.
For the self-criticism, the compensating feeling you most likely would be driven to attain would be something like approval or recognition. But the most important thing is to process the negative feelings of not being good enough. You don't need to necessarily recognize what you are attached to, although its helpful. Maybe you are not being driven to attain anything, and the attachment/aversion cycle is not fully forming. Working with the negative feelings is the starting point and if you need to see how you are being driven to compulsively attain the positive as compensation, you will eventually see it.