Below is what I do. It's a passage from my recovery story (my full story can be seen here:
My recovery story).
----------------------------------------------------------------------------------------------------------------------------------------------------------
The other thing I eventually noticed was what was going on in my head.
My thoughts frequently got stuck in loops.
Bad predictions about what might happen.
Anger about things that had happened in the past.
Going over things and back to them again.
Then going over them and back to them again.
I hadn't really realised how much mental energy I was spending doing this until I started noticing it.
But I didn't know exactly what to do about it.
And then I found I didn't need to argue with the thoughts or try to stop them or force myself to think positively.
I could simply notice:
“Oh. I'm doing that again.”
Then I'd lengthen an out breath or two.
And carry on.
The thought would come back.
I'd do it again.
It might come back again.
And I'd do it again.
It wasn't about getting rid of the thoughts. It was about interrupting the loop.
And it's what I do to this very day and will continue to do for the rest of my life.
One thing that really helped me understand this better was
Steven Oats's book, Rewire Your Mind Without Willpower: A Brain-Based Guide to Breaking Mental Loops, Calming the Nervous System & Creating Lasting Change.
The idea of breaking mental loops without trying to force yourself to think differently really resonated with me.
The book is about working with the brain rather than trying to bully it into changing, and that fitted surprisingly well with what I'd been discovering for myself.
For me, it became pretty simple:
Think small - take baby steps with life. 
Notice the thought loop.
One or two long out breaths. 
Carry on.
Rinse and repeat. 
-------------------------------------------------------------------------------------------------------------------------------------------------------------