Using a medical metaphor, the mind is the “Placenta” of a person’ life. It holds and nurtures into being (in your life) the information you feed it with.
If you feed your mind with negative self-depleting information, it will hold and nurture it until the information become see-able and feel-able in your life. And if you feed it with positive self-building information, it will hold and nurture it until the information become see-able and feel-able in your life, too.
Therefore, sieving the kind of information you expose your mind to is very important, and learning to sort and delete thoughts from your mind is also very important.
Ultimately, you will win the battles of your life by taking control of what goes into your mind and (you) retain (it) to get (it) nurtured into being.
So, if a thought pops up in your mind and you don’t want the result that that thought will produce, your only remedy is to abort it before it is carried to full term.