I make plans then I do them. I stay busy with my hobbies. I crank up music that makes me want to dance. I surround myself with other people. I look in the mirror and say "stop" out loud. I say the first step out loud. I do whatever it takes to stop obsessing.
My daughter is in recovery but I have to do these things all the time. My obsessive nature is always looking for some thing/one to focus on.