I am a little confused as to what is going on, but I will answer as best I can.If you and your boyfriend have agreed to be monogamous, and you have broken the terms of that monogamy, than you have to tell him that that style of relationship is not working for you- it is only fair to him. Different couples define monogamy differently- what may be cheating to one couple might not be to another.
However, from what I can gather, you are worried about your boyfriend being upset that you are friends with your ex- and I personally would hope that any partner of mine would not make restricting my friendships a term of monogamy- if any partner tried, then they would no longer be my partner. I think you should be honest about this friendship with your boyfriend- perhaps start by asking him if he's friends with any of his exes, and then you can come in saying you're friends with one of yours.
If I'm wrong though, and you have in fact cheated on your boyfriend, then you definitely need to tell him what you've done, whatever the consequences. Its only fair.