it sounds like you're prone to ruminating about things, which can blow things up out of all proportion. It feeds anxiety, the mind is a powerful and not always a helpful tool.
look, you aren't an evil person, yes you messed up but now it's time to try and repair the damage, admit your error, own your action to enable you and your DH to move on. Marriage is about recognising each other's weaknesses and being able to recognise the imperfection.
can you clear the air with your DH, say you know you were completely wrong and that you do want to move on, not because you're dismissing his feelings but because you want to repair the damage. Apart from that, that all you can do, you can't turn back the clock.
ETA - having read your most recent update, only you know whether those messages were innocent or if they cast doubt on your relationship. If you were drawn into thinking he was perhaps crossing a boundary, then you do need to bring that into the conversation to say you felt at the time they were dodgy but you trust him at his word.
if however you have lingering doubts despite him trying to convince you otherwise, then that's a whole other can of worms.