Whenever you get stuck in unwanted thoughts, think of your thoughts as birds. Thoughts are like birds fluttering around in your mind.
You are not the birds. You are not your thoughts. So let go and let all your thoughts leave your mind and fly away. If other unwanted thoughts appear, it’s OK. Just let go, free your mind and let thoughts like birds fly by.