I see your DD is very recent. Be gentle on yourself. It does take time...it does.
So you asked the million dollar question! I still struggle with this on and off as well too. There are things you can do. Like when you start to think, snap and elastic on your wrist; grab out a photo of something or someone very happy (pet, kids), smell something nice that reminds you of something nice, listen to music...my favorite is listen to Christmas music.
Find what works for you at least some of the time and then stick with it..it takes 21-45 days to form a new habit and we have formed the "habit" of thinking of it. So we must form a new habit to replace it. It also helps to keep busy.
Also, try to think if there is anything you are getting out of thinking about it so much? Perhaps you really do still need to process it quite a bit more...it was quite a shock!
Do you feel better somehow by feeling sorry for yourself? I know I did! It is then, in a weird way, making you feel good to feel bad by thinking about it? I found that actually this was true for me. I Needed TO sometimes feel good and sorry for myself, think really good, cry and then try to move on that day.
I stopped beating myself up for feeling sorry for myself. Its okay to feel sorry for yourself...who wouldn"t! But I also asked myself, is this ruminating or am I really solving something, processing something that is helping me to move on by thinking about it again? That helped to ask this. If I wasn't really getting anything new by thinking about it, then I said, well put it in the back of my mind and let IT work on it there because I have better things to think about in the front of my mind.
On the other hand, I too also realized I did not want to linger there too long.
Also, I think you have to be ready as well to do this. I found that I needed to feel sorry for myself ENOUGH before I was really to work on forming that new habit.
Still at 15 month, I like to feel sorry for myself...I deserve it...yet I AM now more engaged in a new project and that helps. It will happen. Be kind and gentle with yourself and at the same time do little things to gently help yourself move forward as well....this is what I am trying to do anyway!