I'd examine what specifically is making you feel shame.
Sex is sacred and all that but I think most people have had a WOAAAHH night where they've acted out of character.
Were you off your face drunk?
What specifically are you ashamed of? That you slept with someone in your circle on the first night? That people will think you're THAT person? That the guy will think that?
Having one ONS doesn't make you 'that' person if that is what you are worried about. He slept with you on the first night too so he can't judge you.
I've had lots of ONS and there are only a handful in my 20s that make me cringe when I think about them - the common denominator being I was off my tits drunk and making terrible decisions. I haven't done that in a very very long time because it did make me feel like shit about myself.
But the ones where I decided I just wanted to sleep with them didn't and still don't cause me shame.
Did anything happen that you weren't comfortable with? That can cause shame too.
Do you have any positive feelings about the experience or none at all? If you did I'd try to focus on that.
This one night doesn't define you. It isn't who you are and you're not keen to go down that path again. Take it as a lesson learned.
If it makes you feel awful you will find you won't go there again. I'd work out what specifically you're ashamed of then challenge the thought to make sure you're not mind-reading or placing your own self-worth in what others 'think' of you.
If it's because you still feel married then you remind yourself that you are not. That doesn't mean you need to go down the ONS path again but it does mean that perhaps you aren't ready for any of this just yet.
I can't help if your shame is due to religious beliefs as I can't relate. If that is the case then perhaps you could talk to someone within your faith who can help walk you through this.
Whatever the reasons you wouldn't be the first and you won't be the last to do it and feel this way.
None of us feel comfortable when we step over our own boundaries. Sometimes it is a case of reinforcing them - other times it is a case of modifying or updating them.
As with most things some of us need to try before we realise it isn't for us. It sounds like this isn't something you're going to repeat anytime soon.
Be gentle with yourself - you are both single. This one blip doesn't change who you are and what you stand for. Shame is kind of a waste of energy unless you can get something constructive out of it.
Live and learn.