You must give it time and patience. There is I'm afraid, no easy answer. You have to be strict with your heart and your mind and lay out a set rules. You will have bad days where you can't help but think about him as more than a friend, but when that happens remember this is all a learning curve.
You are now one step closer to finding 'the one'
Friendships are special. Don't throw it away. You can do this... :]