Alchemist, that's brilliant! Must have been mortifying at the time, but what a fantastic expression of complete dickishness for all to see!
Sole, I think he obviously got to you if you are still brooding about it 6 years later, so you have your answer, he said it because he knew it would hurt you. Is it because you haven't met anyone better than him since then that you are still giving credence to what he said?
Fwiw, my DP said the same thing last week shortly after I'd had him arrested for an aggressive outburst in my home. I have moments when I believe that he was right, that I'll never meet anyone else who I get on with as well, have as much in common with, just fit with etc.
But then I remember that I was a pretty fucking amazing girlfriend and even if I never meet another man who can make me melt just by looking at me, I'll also never put up with that shit again and that actually it's him who will never find anybody better than me . The difference is I wouldn't feel the need say it to him, as I don't have an ego the size of a house. And also, I know that he is already (or very soon will be) aware of this.
As a pp has said, if he really were the best you'd ever get, he wouldn't feel the need to tell you that, you'd just know and regret it for the rest of your life.