methinks, you have a lot of misconceptions about what being gay is. you should remedy this. And from your answer, you treasure the guy more, and since you have sexual feelings for him, guess, you are in love with him. whether that makes you gay or it's just a natural thing for you, you decide.
also, you'll need to try and accept the truth about yourself, and this requires courage. if you have accepted, you made the first step, you can then decide about how you relate or how you want your relationship with your friends will be. that is, if you are resolved on having a romantic relationship with either of them.
then your friends have to make their decision about you. it's up to them and especially up to the guy. the consequence, good or bad, you'll have to accept. good luck! the key is end your confusion and make a decision.