Indulgent Emotion/diet

I have hard time putting this into the practice. I have the tendency to go on and on about the topics in my mind that serve no purpose.Ex: incidents or conversation that happened and even after that is OVER in the practicality of the world. I run circles of that issue in my mind. I sincerely feel that it is an indulgent emotion that is draining my inner energy.How to practice DIET from these. Resisting or distracting makes it worse and I tend to allow these for days and now watching them consciously is working reasonably OKAY. Sometimes I caught myself talking about it out it others and not proud of myself about that either.