I hear you about switching off and not ruminating over programming problems after work hours. I have found that (a) exercising for 30 mins helps put me “in the moment” provides a nice mental break and “palate cleanser” and (b) practicing mindfulness has helped me be more intentional about controlling where my thoughts go.