This can be done with practice. There are several meditative practices to overcome an obsession with transient thoughts. Check out Daoist meditation as a start:
https://en.wikipedia.org/wiki/Daoist_meditationThere are many good guided audio meditation available these days as well.