Aw, man! What a horrible situation to be in.
The unkind way to look at it is that he was friends with you only in the hopes of getting into your pants, and then when he was there he decided that’s not what he wanted and bailed. That is sucky behaviour on his part, and maybe you’re better off getting rid of him.
On the other hand, he sounds kind of troubled. Why would you pursue someone for years, and then drop them? Either he doesn’t know his own heart, which must be painful to realise, or he’s been crushingly disappointed in something he’d built up as the shining super-special one thing he needed to make his life complete. He may need some time to get over you, and perhaps you can be friends after a few months or a year of being at a distance.
On balance though: you “did not meet his expectations”? What, like that’s your fault? He sounds like a ass. It’s sad to lose a friend, but I think he might not be a friend worth having.