I call this "mental shelf space."
Humans don't have the option of thinking about nothing. Our "shelf" of thoughts is always full.
But we can control the percentage of positive versus negative thoughts on our shelves. Add more positive thoughts and your "shelf space" for negative is reduced.
That is how you program your own mind for happiness and success -- you just spend more time in that thought mode than a negative mode.