But my kind of self-talk can't be easily bucketed in either "instructional" or "motivational". I usually have elaborate scenarios playing in mind that have nothing to do with the current context. I imagine myself being a motivational speaker, or giving a big interview, or cold approaching a woman, and blurt words that I would say—sort of like an idealistic scenario where people are responding just as I want.
Honestly, it's quite distracting and I would be surprised if there's any visible upside. Sadly, there's no (easy) way to shut the brain down.
I had begun to develop this habit when I was a digital nomad in foreign countries with no offline friends for a few years -- mostly a lack of offline interaction resulted in my having those with myself. I can see how this happens easily to us introvert types who don't favor a lot of in-person contact.
I found engaging my brain more actively and feeding it more stimulus helps control this. Something that can actively engage any possible downtime cycles from your brain, such as playing video games. When working, I would either sit in a cafe where people spoke the local language (that I couldn't understand) without headphones, or listen to a foreign language radio/TV show.
Whenever I zoned out of work, I could absorb this strange input that I had to think really hard what to do with. When I wanted to focus on work I could tune out the stuff I couldn't understand anyway and work.
Or of course, you can try hang out with humans in person more, but I understand that's not always preferred :)
I used to have this and it was as inconvenient as you said here. I tried to work on extending this 'skill' (really important to first acknowledge that it's not necessarily a weakness) by just feedbacking "reality-check" to scenario-modelling. For example in my "Deliver a class" mental scenario, I used to assume that I'd be as smooth as Feynman. In real life presenting, that's obviously not the case! I used to cringe and get frustrated so much, until I told myself to back off and let the process continue (indeed, it's not easy to shut your brain down!) So I tried introspection. I realise several factors about myself and what things from the environment affect me ... so I loop all this back to my mind so the next time I do another mental presentation scenario, I take these into account. It gradually gets more 'accurate' (by this I mean real outcomes don't seem as widely off-the-mark ... it also helps to acknowledge a large margin of error!) and now I use it for "important conversations" as a way to find key points/ questions and, surprisingly, to get myself more relaxed.
Honestly, it's quite distracting and I would be surprised if there's any visible upside. Sadly, there's no (easy) way to shut the brain down.