I can’t really call this one. It depends on who you are. And what you want.
The only advice I can give you is to totally throw away everything you know about morality, because morality is relative, but we live in a society where certain things, especially things associated with sex, are hammered into us as the ‘right’ and ‘wrong’ thing to do.
Now decide, free from the idea of whether or not what you did was right or wrong - do you want to tell him?
Do not try to separate what he will do - because he will get mad, and he might even break up with you, and it will be upsetting. Not as upsetting as it would be if you never told him and he found out, probably, but maybe he won’t find out. You don’t know. I don’t know.
I think reasonable people would forgive someone for stuff they do while blackout drunk. He might not think that, though, so there’s nothing I can say, since I cannot predict the variables.
Either tell him or don’t. If you tell him, stress how much you regret it, say you were blackout drunk and that you never would have done it in your current state and you don’t know what happened. Stress how it’s totally your ex boyfriend’s fault.
If you don’t tell him, hope he never finds out. That’s really it.