As Karen pointed out, try to stay in Presence. I got several things that help me with that.
1) Focus on sounds and images without attaching "labels". What I mean with this, is that you listen to a bird (for example), but only focus on the sound. Don't think about the bird, just hear the sound come forth and fall back into silence. Same with images, see the shapes, colours etc., but try not to think about what it is (like, a tree).
2) Focus on your breathing. If you focus on your breathing, there is no room in your head for thoughts.
3) This one works very good for me personally. Try to smile every time you catch yourself thinking about the past (and/or the future). See it as a game, and smile so that you don't blame yourself, but can go on without a negative feeling. Plus, smiling will make you happy, and will make everything in life easier :).
I also use point 3 for negative thoughts (though negative thoughts are 99,9% time related). With some practise, you will become better at staying present, and you will slowly stop to worry about the future, or feel bad because of the past. Smiling will create acceptance towards those things.
All the best!
Acceptance is the key
Existential depression and Insecurity
Try to keep smiling! :)