My best friend kissed me but I have a boyfriend and he knows..Help!!:(

So as the title says my best friend of 3 months kissed me yesterday..He knows I have a boyfriend but we already made it so that's we are good friends because we have a lot in common but we were hanging out talking (he's like the only person who listens to me and helps me with my problems, I'm the one who usually I helping everyone else) and then he hugged me and pulled me close, I thought that he needed some comfort , he was telling me about something difficult to talk about but then he acted a little weird and then kissed me ... I was completely shocked and took a second to realize what was going on and told him we shouldn't be kissing and he stopped but then just kept shaking his head and apologizing and saying sorry I'm so sorry I never wanted to put you in this situation , I didn't want you to find out like this and I just don't know what to do, afterward we just tried to act like normal and like it never happened but I'm torn with guilt and I really don't want to hurt my boyfriend but we have been having some problem as it is and I just was hoping someone could please help me figure out what a person should do in this situation , I really want to tell my boyfriend but I don't want to hurt him, and I feel like we are already growing apart with these problems and I don't want to make it worse... Please help Any advice is helpful, of you are going to say I'm a horrible person I already feel like I am you don't need to say it. (my boyfriend is very insecure and already downing himself saying that he's not good enough for me so if I do tell him what would be the best way ?)

Ps I don't want to lose either of them.
My best friend kissed me but I have a boyfriend and he knows..Help!!:(
Add Opinion