Your problem is classical case of recursion.
Wikipedia says:
Recursion is the process a procedure goes through when one of the
steps of the procedure involves invoking the procedure itself. A
procedure that goes through recursion is said to be 'recursive'.
To understand recursion, one must recognize the distinction between a
procedure and the running of a procedure. A procedure is a set of
steps based on a set of rules. The running of a procedure involves
actually following the rules and performing the steps. An analogy: a
procedure is like a written recipe; running a procedure is like
actually preparing the meal.
You think about the halacha that says not to think about it, but you're using that halacha to avoid thinking about it, again.
Essentially, what you need to do is not to perform the procedure at some point. One answer mentioned, here suggests not to think - at all. That doesn't solve the problem, at all, because you need to think about something at some time. People that never think are, well, just plainly stupid. That's not you, and you don't want to be stupid, believe me.
You just need something that helps you stop thinking about halacha when you enter the bathroom. There are many simple things that you can do.
For one thing, you can excrete without lifting the toilet seat. Trust me - within a few seconds, you won't be thinking about halacha or anything else other than how to clean up the damage before your wife finds out what you did. Then, you'll be thinking of some clever excuse to explain to her why you did it.
Best of luck to you. You, indeed, have a bigger problem than you think!