In mindfulness, even though you are trying to concentrate on the breath and the counting when the 'thought' comes, you don't instantly suppress it but recognise it, call it out so to speak, then go back to your breath. This helps defuse it.
Imagine you were thinking something awful. The usual impulse is to try to shut it off. With this it is the opposite, you recognise it and look at it, then let it go. So the terrible thought can lose its power bit by bit.
The other thing perhaps you might like to look into, which you can do on your own, is Emotional Freedom Technique. A very good book about it is by Valery and Paul Lynch.
You hold an idea in your mind, while you tap on a series of points on your body simultaneously (accupressure points). As you do so, another other thought may 'intrude' (as it does when you are trying to count your breaths in Mindlefulness). So, then, you take that latest 'intruder' thought, and now hold that in your mind, while you carry out a new round of the tappings.... and on it goes. As you do so, images come to you, one after the other, that are at the heart of things, and there is a great release. It is like peeling an onion.