I've always done something like that, even before I started learning languages. It was part of a general tendency to overanalyse everything, and while I'm getting rid of that tendency, I have found the continuing internal monologue and/or dialogue quite useful in learning languages.
But I have found it increasingly difficult to employ consciously, as I keep finding that my internal monologue/dialogue keeps switching on in a different language from what I intended.
Of all people, it was Wikileaks' Julian Assange who gave me an insight into what's going on here. I read an article on him on the New Yorker's website several weeks ago -- here's the relevant passage: