I’m worried a coworker will share my secrets?

I work with two guys constantly and became close to both of them. I slept with one of them (a lot and pretty currently) and I told the other about it but told him not to tell. At the time he seemed super trustworthy but recently his entire attitude towards me changed and I’m worried he’s going to tell the other one that he knows we slept together which will ruin my relationship with the other one. I’m aware I messed up big time but how do I cope with this anxiety and what should I do if the worst case scenario happens (they both hate me and tell everyone else I work with) I love my job and really don’t want to quit over this hypothetical but potential situation
I’m worried a coworker will share my secrets?
Post Opinion