You can try getting it out of your system by journaling your thoughts or talking to a friend to “let it out” then consciously trying to put it behind you.
You can try to put yourself completely in the moment, here and now, by focusing on the things around you and not focusing on the past or the future.
You can distract yourself with a book, game, movie, music, or hobby. Try to put your mind on something else.
You can try to “self soothe”. Try some aromatherapy, relaxation tapes, things like that.
You can try to make lemon-aid out of lemons by focusing on what you’ve learned from the experience, or perhaps helping others going through it (support groups or things like that.) For example the Mothers Against Drunk Driving group has channeled their anger to try to prevent further tragedies. Whatever you have been through perhaps you can learn and grow from it or help others through it. It would help you burn out the obsessive energy and let it go.
You can talk to a counselor.