Dogs can suffer from a variety of anxiety disorders and other mental conditions including obsessive compulsive disorder.
Sometimes there's a known cause like not enough socialization, not a good energy outlet or being raised in a stressful situation.
Sometimes there's a trauma which can cause the anxiety.
But sometimes there's nothing obvious and the though is that maybe there's a genetic component.
Your best option is to work with a professional behaviorist who can help to identify the disorder and teach you methods to condition Ted.
Neutering Ted will not cure the anxiety but it can help to better regulate his temperament and I recommend to discuss this with your veterinarian.
Lastly, here are some articles about anxiety. Some may not exactly apply to Ted but will still contain some good information:
https://www.petcoach.co/article/separation-anxiety/https://www.petcoach.co/article/how-to-help-a-dog-with-car-anxiety/https://www.petcoach.co/article/7-natural-treatments-for-dog-anxiety/Researching on your own will also be helpful. Familiarizing yourself with canine body language and dog training can help you to recognize what your pet is trying to say. You can find many books written on the topic and there is a trainer named Victoria Stilwell who I think is particularly helpful.
I hope this helps and please feel free to post any additional questions.