How to move on when the person is still in your life

I have learned to let go of the anger and hurt that my ex left me with.  One of the reasons is that I have met a great friend.  The problem is that I have felt more then friendship for him for quite a while.  I never said anything since I did not want to loose this person in my life if he did not feel the same way, and we also hang out with the same group of people it would have been awkward.    I always hoped that maybe one day, well you never know.  He always texed me every weekend even if I saw him to find out how I was doing.  And when I had surgery he texted me every morning. Well other things also that  gave me an idea just maybe.  But three weeks ago I found out he was seeing another guy.  And no,  none of us (the group) never knew.   He is attracted to both.  Well I know I need to move on, but how do you do that when he is such a part of your life? It really hurts