I had sex with my bestfriend HELP!!!

The whole situation is actually pretty messed up. I met my bestfriend H (that's a guy) through my bestfriend who used to mess around with him. Like I would take her to his house so we could all hang and they could eventually have sex. Well I met his friend B who I eventually started talking to and messing around with. Thing is, I began to develop feelings for the guy but out of no where he completely ghosted. I didn't tell anyone about how I felt about him so everyone just kind of assumed we both got  tied up in work and stuff and just fell off. Fast forward like a few months. I get back in touch with B and I'm not exactly sure how I feel about him anymore part of me still likes him but the other part is kind of like fuck you. However me and H hang out a lot and recently we had sex, I definitely don't feel like it was the right decision and even cried because I felt awful and guilty afterwards but it did give me a sense of clarity. I don't want to lose his friendship or my other bestfriends but I know that I don't want anyone else but B. What makes this even worse is I think H has some sort of feelings for me and right now im at a loss of what to do.