Hi!
I have this. Mine is a bit different, as follows...
I internally repeat phrases I hear in conversation (while engaging in conversation or over hearing), or in films/tv, etc. My mind just automatically picks up a phrase and begins repeating it until its satisfied with it I suppose, haha, and then chooses another! Now what I also do in combination with this internal echolalia is I simultaneously count the syllables of the phrase on my fingers & or/toes by moving them; such as touching each finger to my thumb for each syllable, and repeating the cycle over and over. I do this while carrying on a conversation and/or watching a film! I seem to be able to continue to listen and engage in conversation while doing this, which boggles my mind! Although sometimes I space out while doing it as well.
I understand it to be a form of self-soothing - I find it soothes my anxiety, but I think its a kind of tic as well. It doesn't bother me because I've been doing it my whole life and its familiar and comforting to me in a way.
Perhaps I learned to internalize my echolalia as a child (being female with AS)...
Anyways, I'm sorry to hear you find it distressing and but know you're not alone!