I want to clarify a bit...
In October 08, I filed for temporary emergency sole custody, and was awarded it, for 25 days because there was enough evidence to support that my H was abusive.
It was later amended, to a brief visitation schedule, when H came to court with half a dozen 'friends' from Church and told a different tale.
What is different in your case, is that you have NOT tried to demonize your wife, you have LOOKED at your own misgivings, and you are WORKING on you.
Sounds like you have nothing to worry about.
Unless you did something so hedonistic, so reprehensible, on the way to the courthouse TODAY, I think the Judge will see right through this charade. Peace.