I try to replace it with a favorite or a relaxing pleasant image - like a deep clear lake in the mountains, or any of the scenery in Alaska... or the face of someone I dearly love - grandson or daughter's in laws, a friend from childhood.
Try replacing it with a friendly image, friendly and familiar.
Depending upon what it is, I usually try turning it into a more positive image.
Keep the situation, that is to say, change its concepts.
If you see a situation in which someone is nearly hit by a car, envision them getting in that car instead, and hugging their boyfriend/girlfriend.
If it's a more concrete 'picture', as a bloody and gory image of an animal, convince your mind that the 'red stuff' is paint, and act as if the animal were happily (emphasis on happily) rolling around in red paint.
It may not be the easiest way, it takes a lot of creative energy, but it usually works okay for me, and I have quite horrid flashbacks.