What is apparent from the short paragraph that you penned is that you have the tendency to ruminate over things. This could be a form of obsession. Obsessional thoughts are seen in individuals with anxiety disorder and obsessive compulsive disorder (OCD).
If these ruminations cause you distress and affect your day to day functioning, you may want to seek consultation with a psychiatrist so that your condition can be properly evaluated.
It must be pretty agonising to keep thinking over the same thought or idea over and over again.
Do take good care of yourself.