I used to have something similar. I wouldn't describe it as worrying exactly but I would go through multiple scenarios to the point that I wasn't sleeping properly, work was affecting home life etc. It definitely had a negative effect on my health.
The approach I took was to forcibly compartmentalise things. If I needed to think deeply about something I would sit down, switch off distractions and do so for a fixed period. I would then find something else to pay attention to: read a book, phone someone, that sort of thing. So I couldn't continue thinking about the problem.
The key for me was to move to thinking hard about something else for a period, not let my mind wander.
I also found that having a couple of "go to" subjects, unrelated to work or home, that require complex thought processes, helped. I switch to thinking about them if there is no other candidate e.g. when I am going to sleep. YMMV but the 2 I chose were developing a new programming language and designing a town. I'd pick an aspect of one of them and think how I'd design that.
It worked for me. The only minor downsides I've noticed are 1) that I really don't like talking about home when at work and vice versa. And 2) when I actually had some free time, and decided to implement the language, I kept nodding off.