I've been in that situation way too many times. The best solution in my opinion is to just cut these people out of your life. It's not a viable solution for everyone, though.
With people giving me proper attention, I've found that my friends don't pay much attention to me when I'm not in a crisis, which has lead to me purposefully starting things in order to get attention. It's crazy, I know, but it was the only way I knew how to get the affection I needed.