The thought is not the problem.
It's the emotions we attach to the thought that causes the problem. But because our thoughts can trigger our emotions, it's important for us to cut off the emotional attachment we often apply to our thoughts, before they make us emotional.
But that can be easier said than done.
So, if your thoughts have developed more of a presence in your life than you're comfortable having, it might be time to learn how to do address it. Here's a great video put together by Headspace to explain exactly how you can do it.