It will probably take a few weeks, it depends how much you cared for your ex bf really.
I just broke up with my boyfriend. To be honest it hasn't affected me much because I've broke up with him 2 times in the last month. Those 2 previous times hurt more, I loved him but he messed me around. I'm not getting back with him under any circumstances now at all, he had his 3 chances and I can do better anyway. He's really immature, acts like a kid, dropped out of uni, has no job and has no money. Has no prospects in life. He used to walk off from me in the street and run away if he couldn’t have his own way or I’d said something he didn’t like. Also, he's told me he's going to play the game now, in other words be a male slag. That’s something I'm against really due to my morals.
Anyway, time heals, so I guess what you could do is focus on having a good time with your friends. That will take your mind off it.