If you're happy to have a relationship with him as a friend, then you should sit down and talk to him - tell him you're unhappy with how things have been for the past few months and you'd like to try to resolve it so you can move on without there being tension between you both.
IF however you want more (and I suspect you do), I would try to walk away. Avoid seeing him if you can for a while, go out with other friends and try to move on - you may be looking at this man with rose tinted glasses - because you can't have him, you think he's perfect and nothing or no one will compare. It's not true! I've been in this situation before and believe me it does get better, but it takes time.
Good luck x