Good grief. All these years I thought it was just me that got this!
I started to grow out of it around 35-40 years old, and now I never get it (early fifties).
Its an unnerving experience and I'd have to think about something else, get up and drink some milk and read a book, etc. With me it was infinitesimal to infinitely large, at slightly faster than 1 Hz. Its not anything visual--just the thought of something (not necessarily myself) that toggles between infinite and infinitesimal. Getting something in my stomach almost always helped. Sometimes associated with that sensation (really, thought or impression--not sensation) was the thought of a sharp object/large needle embedded in the small of my back. Ain't the brain fascinating? It is loaded with feedback paths with gains and delays barely adjusted to prevent oscillation (usually). It seems neurons adjust their gain just below that threshold, ideally. Somehow keeping things barely below oscillation improves brain utility, I suppose--kinda like a regenerative radio receiver--makes it more sensitive and discriminating. Maybe a lot of simple thought processes can be accomplished by iteratively processing the data.