We had written each other stories about our imagined sexual encounters and the night before it all ended I had asked if he wanted the part 2 to the story. So I published it on a site we both used, and he commented that he missed me. It made me physically sick. I posted it to get it out of my system.
No you didn't, you posted it to get his attention.
If you want to move on you need to be honest about your motivations and behaviour.
I never want to hurt someone the way I hurt his wife again. Because she’s right.
Never want to? Yet you continued, after she contacted you, to offer a 'part 2', write ramblings about him online etc. You do want to, you just don't want to get caught or come out looking like the bad guy. But you and him both are.
Your overly earnest and romanticised way of describing what is essentially finding stuff in common with someone, talking about shagging each other and imagining it's something great love story is very teenage.
You'll say this is an attack, I'm sure, but it's a reality check. From the outside looking in it is very cringeworthy and you need to see it for what it was. This isn't love, it's you being infatuated with someone and him not wanting to continue it.
Really put your feelings in check - whats the best that could come of this? Would you leave your husband for him? If so (based on the fact it's been an online flirtation) you should do so anyway as the relationship should be robust enough to withstand fancying someone else and letting it get this far. If not, you need to think about how you have risked your real life for a fantasy one.