I don't really understand the need in the gay world to stay friends with exes. In fact, I find it strange. How many hetero guys and girls do you know who stay friends after they split up? I think it's good to remain FRIENDLY, but friends? Why? You were dating, it didn't work, and now you want to hang out as buddies without the sex? I don't get it.
In my experiences, it's nearly impossible to toss out all of the intimate relationship feeling and change the very nature of your relationship to that of a pure friendship. I've known a lot of gay guys who try this stuff and they all end up jealous. Get a few drinks in them and, next thing you know, someone is upset because the ex, who is now just a friend (yeah right), is chatting with another guy at the bar, etc.
I've stayed friendly with all of my exes. Over the years, I'd say that I've even developed a genuine friendship with one of them. But it took time. I don't think it's possible to flip a switch from boyfriend to friend. It takes time and quite often it's simply not meant to be.
I suggest that you move on with your life and let your ex move on with his. If and when you're meant to reconnect as friends, you will. Don't worry about how much time you've invested, etc. That's what we do in relationships. Not to sound harsh, but sometimes it pays off and sometimes you cut your losses. Let the emotions settle down and give each other some space and time to reflect. If and when it feels right, you'll find a way to rekindle the friendship. But don't try to go from boyfriends to friends overnight.