Complicated

So my bf and I have been together almost 4 years. We broke up for about a month and we’ve been working on things lately. He confessed to me that he had, in the in betweens, been sleeping with someone who used to be my close friend (I’m more upset with her than him to be honest). She got feelings involved and he doesn’t want to hurt her, but he wants to be with me. How do we rebuild the trust? This has never happened to me before.