Some people literally call it a 'stuck thought' as for example in this extract where these words are used in the context of certain anxiety disorders:
Stuck thoughts; thoughts, mental images, concepts, songs, or melodies that stick in your mind and replay over and over again.
Source: http://www.anxietycentre.com/anxiety-symptoms/thoughts-that-seem-stuck.shtml
The concept you described, if it is a repeated picture in the mind, is also sometimes called a mental afterimage as in these examples:
From google books'Out of the Blue: September 11 and the Novel' By Kristiaan Versluys on google books:
several months after the events [...] the author is still incessantly re-enacting the collapse in his mind. More precisely, he sees a mental afterimage of the glowing tower from different perspectives and distances.
Another example in a literary context:
Major Lund smiles at him encouragingly, and then leaves the room, trying hard to erase the mental afterimage of Beckstrand's [...] face and neck.
Note that 'afterimage' literally refers to a transient anomaly of vision and 'mental afterimage' is its equivalent in the mind.