I regret this a lot (posted in multiple groups for diff perspectives)

For some background, I’m currently a virgin, and when this happened I hadn’t done anything other than kissing.So there’s this guy who is my older brothers friend and he started messaging me wanting to talk about something. I at first felt uncomfortable because he had a longtime girlfriend, and he said he wanted to come over to talk to me. I said “if you’re trying to get at me that’s not gonna be okay” and he got upset with me and I felt bad because I didn’t want him to think that I thought of him that way, and he then explained that he wanted to talk about how his girlfriend was cheating on him. He’s a close guy friend of mine that I tell most things, so I felt bad for upsetting him. I apologized, and then he confessed that he regretted ending things with me (we talked for a short period of time a year ago) and he expressed interest in me. I kind of went with the flow, but made it known that I would never do anything with him while he had a girlfriend, because I’m not that kind of girl. Later on he was spending the night at my house with my brother, and he came in my room to talk. We were hanging out and it seemed to get flirty, as he put his arm around my waist. I felt weird about it, but didn’t want to offend him. Later he leaned in for a kiss, but I stopped him and reminded him of his girlfriend. He told me that they broke up, and he had confronted her about cheating. I felt awkward and that the mood was lost, but we continued to hang out. So eventually he leans in again, and this time I reciprocate it. Things go a bit further and I did a lot of things that I had never done before, but he asked me if everything was okay every time I seemed uncomfortable which I appreciated. I told him it was okay, but the whole time I was literally shaking because I had never done those things before and was so nervous. (We didn’t go all the way btw) we did this stuff for about an hour or two, and eventually it was 6 in the morning (he came in my room at about 2:40). We talked a bit about what happened after, and I assured him that it was good, although I was nervous. We agree to keep what happened between us and not to tell anyone. The next day he seems a bit distant, and hasn’t messaged me. I begin to worry, but try to stay hopeful. The next day he texts me this paragraph explaining that he spent the whole night patching things up with his girlfriend and tells me not to feel bad because they weren’t together when we did those things, and once again asks me to not tell anyone. I was really hurt, and felt like I was just a quick break from his long term relationship. I really regret doing those things, and feel guilty. Guilty because I can’t tell my best friend, and regret because I feel like I let him do those things so easily. To clarify, I consented to everything so there’s no assault here or anything, I’m more dealing with the regret afterwards. I just want someone to talk to about this because I can’t talk about it with anyone I know personally and have been holding all of this in for a week or two. Maybe some advice? I feel like a bad person for doing this, and feel like I should’ve gone with my gut feeling and not done any of it.