Can't deal with it
You're tying yourself up in knots here. Which is worse, the actual mistake for which you felt instant regret or the mad runaway thoughts racing away in your head. I'd say you'll agree it's the latter. We need to stop those thoughts, so let's be practical.
It's enough that you made that mistake once without you now reliving it second by second again in your mind. Also, each time you re-visit it, it grows into something even weirder. Be it true or not. Get your test results confirmed and talk it through with your wife. I get the impression she's an understanding person so this is your time now to show her your trust. She will appreciate that. Remember, it's trust that got you both together. that's the building stone of your relationship. Rebuild. In that spirit of trust and forgiveness those silly evil thoughts cannot exist.
From what you say I can hear loud and clear that your wife is important to you and that you love women. What ever the history of the woman at the brothel is it doesn't change what your attraction is. You sound a lucky man to be married to your wife and that this is something you will be able to work through together. Let what happened be a mistake. Focus on the relationships and the people that matter to you.
All the best.
I just wanted to check in about the feelings around the HIV test, I can remember how scary it was the first time I had one, probably because of all of the possibilities of what might happen. In terms of risk, using protection definitely helps keep you safe, and you would have potentially been at greater risk if you had hooked up with some one from Tinder because they wouldn't be likely to get tested as regularly. Even so you are doing the right thing and can put your mind at rest. Do you need more information about the risk and how to keep the risk at a minimum?