How to get over someone is a tough one, and why so many people take breaks where they don't come in contact with their ex for a period of time in order to process things and re-adjust to the situation. Other people jump right into another relationship to sort of replace their ex, or at least fill a void that their ex used to fill.
I do a number of different things, some of them constructive and some of them destructive, when I'm going through a breakup. What I've found most useful is in reminding myself of the status change and looking towards the future, sort of re-writing it now without him in it, or in a different role. After a while, I find that I'm holding onto the future I lost more than I'm holding onto the person. All the things we were supposed to do together, all the things I could have shared with him. Sometimes, mourning that future-that-will-never-be is really what's making me upset. Because, if I think about it rationally, either the relationship was not actually a good one by the time the breakup happened, or the relationship appeared to be good to me at the time but he turned out to be not who I thought he was and it was really better for me that I discovered that as soon as possible. I end up missing the person I hoped he was, and not so much the person he actually was.
So I reconstruct my life and my future without him, either the real him or the him I hoped he would be.
If you are trying to break a pattern that includes using a breakup as an attention getter, presumably to try and coax him back or as incentive to change behaviour because he now has to face the reality of losing you, then re-writing your future in your head as one without him in it, or in a different role, may help. If you can get it into your head, really into your mind, that his role in your life is something other, such as a friend, mentor, etc., then your behaviour should reflect the role you think he ought to play, meaning that your behaviour will naturally change to reflect the new mental model you have of this next version of your relationship. Sometimes having some distance can help in getting the clarity I need to do that mental status-change. But I try not to let that go on too long, or I end up building a pattern that includes avoiding him, which doesn't help the transition to friends.
Sometimes intentionally arranging to be around him again (or talking to him if distance is a factor) in such a manner that emphasizes the new role can help reinforce the idea in my head. That tends to be somewhat emotionally charged, and I can come away from the event feeling like crap at first, but the tangible reminder of the change in our roles to each other can help me get over things faster. Sort of like pulling off a bandaid quickly vs. procrastinating and trying to pull it off slowly.