I don't have this nearly as bad as it sounds like you do, but I have sometimes experienced having a song stuck in my head to the point that something similar happens to me, where it plays in my head on loop and repeatedly distracts me from other things I want to do.
One thing that occasionally helps is listening to actual music while I work. I have a specific 35-minute playlist of songs, not in my native language, that I've been using for this for so long that they have become associated with locking in to work and are not very distracting.
The other thing that sometimes helps is meditation. Not just taking a minute to focus on the breath and recenter, but actually taking a break to go meditate for like 10 minutes, and if this is a recurring thing, meditating in the mornings. This seems to somewhat help my mind stop racing so much, including when music is stuck in my head.
This happened to me in the past as a result of listening to a lot of music (when I spent a couple of days without streaming music, it went away). Have you tried quitting music temporaril?
I have not listened to music in over 5 years, but it still doesn’t help unfortunately. Glad to hear that it worked for you though!
I have a number of noise issues that arrest my attention. This used to be one of them, but it has gone away; I’m not sure why. I dealt with them by studying in a place with a good amount of white noise: a busy coffee shop, or a bar. (It’s no good if they’re not busy, because then I focus in on whatever single audible conversation is going on).
I also listened to music all the time. Finding a good long set of instrumental music seems like it would help? You said you haven’t listened to music in years. What I find is that when working or studying with music on, I will tune the music out so hard that sometimes I realize I’ve been algorithm’d into songs I actively dislike and have been “listening“ to them for 10 or 15 minutes. This includes songs with plenty of words.
Overall I guess I’d say: if a silent environment isn’t working for you, add noise!
(So far as exorcising a song stuck in my head, on the rare occasions I can’t get rid of one: I have a go-to song that I never get tired of, that I force-play in my head until the unwanted song goes away. For me it’s Waltz for the Moon.)
I think I broke my brain a little, growing up playing so many video games. I think my brain just assumes that there should always be music playing. It seems to default to NES-era chiptunes. Certainly not exclusively. There have been a few times in my life that I had the same song running in my head for months. Magical Trevor was the worst. That was like 3-4 months and it felt like I was going insane. I also have pretty tinnitus too.
I have ADHD, and I take medication for it. That helps me control my attention. If you don’t have ADHD too, that’s not helpful to you though.
The other thing that helps is to actually listen to instrumental music. I default to instrumental funk for some reason, maybe some EDM once I’m in the flow. I don’t want lyrics, as that will take up too much of my language processing capacity. reading while music with lyrics is tough. that said, I do like reading along with audio books too when I can, as that keeps me even more focused.
As for it getting better? I’m afraid not. I’m almost 50 now.
I would suggest this :
For context, I have always had music playing in my head constantly, whether studying or just generally in daily life. (I know the music's internally generated, i.e. it’s not externally generated.)
Throughout my life, this constant music has made it near impossible for me to study. Essentially everytime I sit down to work, the music starts to play in my head, gradually occupying more of my attention until it takes over my awareness completely (often without me realizing it happening).
As a result, by the time I notice, I‘ve lost my train of thought and have no idea of what I was doing / trying to focus on beforehand. Furthermore, it also feels incredibly difficult to redirect myself back to studying; my brain feels “stuck” listening to the music, with a huge inertia against doing anything else. Even when I genuinely want to return to the task, I find it hard to do anything besides just continuing to sit there, listening to the music.
TL;DR: For people who have experienced this exact same problem while studying and overcame it: how did you? Specifically, what strategies do you use in the moment when your attention is already stuck on the music to shift it back to the task?
Some suggestions I’ve heard are to redirect your attention elsewhere first — for example, imagining turning the music down with a mental “volume knob”, or shifting attention to the breath first before returning to the task.
Also, for people who have overcome this: did the music become less frequent over time?