this January i had to learn a mild form of meditation for EXACTLY what is stated in the OP.
i was on the verge of some kind of breakdown, thinking nearly constantly of the horrors i endured over this past winter. which only got worse. but learning to focus on my immediate environment to break the lame thought patterns has kept me sane and even sometimes happy in spite of the aspects of my existence that i find... lousy at best. in spite of the fact that I'm reminded of those aspects at least a couple times a week.
i suggest breath awareness mediation to anyone having as severe a problem with the past as i.
the point is to focus on your breathing, how it feels, how it sounds, until that is the thing you're thinking of is breathing instead of whatever was giving you trouble.
i also had to breathe deeper than normal. I've used at least 4x the oxygen this year compared to my normal intake.
it's simple to do, the real trick is to notice you're in a negative thought pattern so you have the chance to escape. at least 2 months practicing that now, and it still won't run on autopilot
but it has gotten easier to notice when i need it, and letting go of annoyances is working a little easier.