Relax. You did nothing wrong — wires get crossed in our heads, and things come out that mean nothingâ€¦ it sounds like thatâ€™s what happened.
If youâ€™re totally present in your current relationship thatâ€™s all that really matters — so tell your boyfriend that, acknowledge your error, apologize, but donâ€™t act like you committed some grave unforgivable mistake, because you didnâ€™t. Hopefully he can see that, and with a little joking and ego stroking heâ€™ll be fine.
On the off chance that he canâ€™t forgive this minor and understandable slip-up, know that it says more about him than it does about you. I donâ€™t know how old you are, but if youâ€™ve been married and divorced youâ€™re going to have some baggage, and any partner worth having will understand and embrace that as part of your past and part of what brought you to him.
This is a situation where the truth will set you free! Just say, honestly, when youâ€™re having sex with him, you are so totally in the moment, that your brain sort of shuts down. You had sex with your ex-husband probably for many years, so itâ€™s just an impulse reaction to use that name. Nothing more to it than that, just a habit like any other. Your next task, (but donâ€™t do it immediately, since he will suspect something), is to make sure to convince him that heâ€™s the best youâ€™ve ever had, better than your ex, and all that sort of stuff. Thatâ€™s probably what is most threatening to him about the ex, that maybe he is more important to you or the sex was better or something.