Your concern is valid and not uncommon. The thought process may be anxiety triggered. There also may be underlying depression in regard to self worth issues.
As long as some anxiety level is present, you may have those repetitive thoughts.
The good news is that cognitive behavioral therapy and medication are quite effective in treating both anxiety and depression.
Hypnotherapy is also very effective in treating anxiety and when it comes to self worth issues.
What you are experiencing is not "weird" A fast paced life, societal and work expectations and stressors as well as ones brain chemistry and coping skills in general can lead to someone experiencing these symptoms.
If it is brain chemistry related medication will help. A primary doctor can prescribe anti anxiety medications.
You are correct that the repetitive thinking can take away from the quality of life.
If you reside in the US, many of the drug companies now offer assistance with medication fees.
I've included two links below of my articles that cover alternatives to treatment and info on cheaper or free medication.