Add the words 'I am having the thought that...'
Psychologists call this cognitive defusion. Instead of 'I am a failure,' you say 'I am having the thought that I am a failure.' That small reframe turns the thought into an event you are watching rather than a fact you are living, which makes it far easier to release.