Do I tell him?

My ex broke up with me earlier this year and stopped speaking to me for a while. Now, 7-8 months later, he’s back in my life. We are not necessarily back together, but I do feel like it’s heading in that direction. During the 7-8 months we were not speaking, I made a mistake and got with someone else. Now he’s back, do I have to tell him? I am honest and open with him about everything else, but in regards to this, I know he won’t understand. I do feel guilty, but telling him will only cause him pain. What do I do?