Ex Boyfriend

Andrea
Have any of you girls had that one ex boyfriend that you know you'll always love? And you're very close friends with him and you feel like you'd still do anything for him? 
My problem is that we flirt with each other and play around. We even fuck. But he's made it clear that we can never be together like ever again. But the truth is we enjoy each other's company, he loves my friendship and I love his. I have the habit of investing too much of myself in this and end up having feelings for him time and time again. Our other friends know about our hook ups because we don't try to hide it, and they say I'm setting myself up for heart break. This guy and I have crazy amounts of history together. I can't let him go. What should I do?