There is no doubt that the difficult part of the breakup, is accepting the fact that the relationship is ended. You will hang on to the past and wish if you only could bring the past memories to life again. Thinking a lot of your past relationship will only grow the desire of calling your ex and asking him to get back with you. That's the worst thing you can do, your boyfriend is more likely to reject your offer and then hurt you again.
However, if you can give him the time to miss you, he also will miss those same memories and then crave your closeness once again. The truth is that after the break up, you need to accept the fact, that you are no longer appreciated then to insist yourself to someone who failed to see your worth.
However, for you to succeed in getting your ex to miss you, all you need is to use the no-contact rule. When you hold yourself from getting in contact with your ex, you'll arouse his curiosity to check what's going on with you.
If he calls, do not answer him, because the time to talk was before he leaves you. If he had asked back then to discuss the relationship's issues, that would be fine, but now it is your turn to make him learn what he missed by letting you go of.
Following the first few days of the breakup, your boyfriend is probably expecting you to call him and beg him to take you back; however, when he sees that you have not called him or even asked about him, he cannot help but want to get in touch with you again. He won't believe that you have succeeded to get over him so fast.
In the meanwhile, you'll have the time to figure out what might cause the breakup, and what traits you may have that contributed to the split. You should be honest with yourself and clearly point out what bad characteristic you should get rid of, then simply substitute them with good ones.
Do not lock yourself in your room and counting how many days you have not been in contact with your ex. That won't help you to gain your self-confidence. What you need is to lead a normal life, go out with friends and attend parties as nothing has happened. It is not because your ex has left you, you'll turn your days in an endless mourning.
Your ex will think of getting back with you, when he sees that you are doing well without him. It is then and only then will he realize what he had lost by letting you go of.