There was actually a study once done on getting rid of earworms. The best way to get rid of it is to look the song up and have all of the lyrics. Let your mind sing through the whole song. The study went under the theory that many earworms were glitches in your brain. The brain is looking for the rest of the song and keeps repeating the few lines it easily remembers. After reading that, I have gotten earworms and got rid of them by giving my brain what it is seeking. I look up the lyrics and run the whole song through my head. It really works.