Spinning in that manner is considered an obsessive-compulsive disorder in our dogs - mood/behavioral disorders characterized by repetitive, invariant, patterned behaviors that are exaggerated in intensity, frequency, and duration given the inciting stimuli (i.e., expressed out of context). The behavior interferes with health and well-being. Earlier in the course you may have been able to stop the behavior, but that may not be the case at this time. Your Chihuahua may hide (to perform the behavior), become aggressive when you attempt to stop it, or may begin avoiding you.
His spinning also may suggest partial seizures or dysphoria (a state of unease) and so consultation with a specialist veterinary neurologist (please see here: www.acvim.org) should be considered. All cases of OCD warrant intervention which is individualized and based on frequency and severity of clinical signs. Treatment is usually a combination of behavioral and environmental modification and psychotropic medication. The goal is to minimize and if possible eliminate bouts of compulsive behavior and the concomitant anxious states that accompany them.
In general, we need to identify and eliminate trigger events/situations. No punishment should ever be used since it can heighten anxiety and worsen the problem. If possible, these pets can be redirected to an alternative and incompatible behavior ("bribing" with food, e.g.). if the redirection doesn't make the pet more anxious. Pets should be calmly rewarded for any spontaneous calm behavior. Keeping a structured daily routine helps decrease anxiety. The most successful medications used in the treatment of OCD in people include SSRIs such as fluoxetine (Prozac) and clomipramine (Clomicalm). Typically, psychotropic therapy is necessary for longer periods of time than other anxiety-based disorders (months to years depending upon severity and how long the disorder has been ongoing). Lifelong medication use isn't unusual in severe cases.
Please respond with further questions or concerns if you wish. I regret that my state board of veterinary examiners doesn't allow me to speak to customers by phone in this venue but other experts in this category may be able to assist you in this regard. Please let me know if you'd like another expert to do so and I'll opt out of this conversation. Please stay in the conversation if you wish.