Self-talk failure

I find that by telling myself what “not to do” I become focused on that behavior. “Don’t do that thing” turns into doing that exact thing.

However, I fall into deep engrossment by distracting myself with a different task.
I am not doing that thing I don’t want to do because I’ve not given myself the opportunity (time or energy) to even think about it.