As soon as I discover that my mind is wandering of, I go back to my mantra. Distractive thoughts are not a bad thing though, let them be.
I simply accept that getting distcracted is a natural part of the process, and when I identify getting lost in my thoughts I refocus my attention on my breathing, knowing that it will always be there for me.
When I get distracted with my thoughts while meditating, i'll try to silence them once I notice them and go back to focus on my breathing. I would also play some nature sounds in my head to silence my thoughts.