Welcome to the Forum, it can be a hard thing to make that first post, not knowing what reception you will receive, it's even hard to admit to oneself something is wrong and needs attention.
Now I've not had the same problem to anything like the degree you have. I too have anxiety ("plus all the what ifs") though this has manifest itself in different physical reasons, from chest pains to headaches.
However when very stressed I do twiddle a hank of hair and end up tugging it hard. not hard enough to pull it our, but hard enough for the discomfort to momentarily distract myself from whatever is stressing me at the time -but only for a moment.
I guess I'm fortunate in a couple of ways. Because my actions are not severe I do not have to worry about having hair missing from my scalp - something I'd imagine you would find most embarrassing.
Secondly it acts acts as a indicator for my partner and also my psych. If they see me doing this it indicates to them better than words the level of my anxiety.
There has never been any serious attempt to stop me doing this, other than my partner saying 'Stop that!' which surprisingly enough makes me realise I'd being doing it, normally I'm unaware.
It comes about in direct proportion to my current overall anxiety level and at times of stress during those highly anxious periods. As my anxiety level drops, by removal of stressors, therapy from my psychiatrist, and medication the problem ceases, at least for then.
I'm not sure how to get yourself to stop except, as I said, by reducing the basic cause, your anxiety condition, and temporary heightened stressful situations.
I've discusses the matter, along with other things with a psychologist suggested by my psych, he put forward the idea of a substitute and less harmful action, mentioning snapping an elastic band on my wrist.
I regret to say I did not take this terribly seriously at the time as we were concentrating on something else, but think the idea does have possibilities
So may I ask if you are under proper medical care for your anxiety OCD, and this worrying symptom? I do know I never improved until I had the correct support.
I do know things can get a whole lot better.