For me, the easiest way to be friends with someone that I was in love with, and whom it hurts to see as a non-lover, is to spend some time not seeing them at all, and let the wounds heal. The time frame is different for everyone and every situation, but it's taken me anywhere from a couple months to a couple years to "get over" them.
This doesn't mean "losing" them as a friend. If the chemistry for friendship is there, it will still be there in a year. But right now, it's probably too hard to be around him without being "with" him.
The cliche about time healing all wounds sticks around because it's true. And some wounds can be healed by nothing BUT time.
In the meantime, have some rebound-flings, try not to fall in love for a little while, and just focus on you and making your life as positive as possible.
“As I am sure any cat owner will be able to tell you,
someone else putting you in a box is entirely different
from getting into a box yourself.” —bisexualbaker