I know it doesn't sounds very serious but it actually helped me quite a lot. When I wanted to daydream (and that involves pacing in circles with headphones), I would put an egg timer and as it went off I would stop my daydreaming ritual and do something like wash the dishes, read something for uni or anything that needed to be done.
Of course that many times I did re-set it, prolonging my full-blown daydreaming sessions, but over time I noticed that I found it easier to 'go back' and control how much time I spend daydreaming.