I have had a mildly similar experience -- when my young horse (he's 6 too) was pastured with a semi-aggressive horse, it made him wary of all other horses, because he is very submissive. He thinks that all horses with pinned ears want to attack him. At our last jumper show, a horse in warmup just cantered around with pinned ears, it was just how he went. My poor horse kept leaping sideways, thinking he was going to get chomped. He avoided that horse all day.
For us, it was a horse confidence issue. He is now pastured with a different, much less dominant horse. He is also gaining confidence in me and in his training, so these instances are now rare. He is learning to trust me and know that I will never ask him to do something unsafe or that he can't do.
I had a similar problem with my other horse too -- I got him when he was 10 and if another horse trotted or cantered up behind him on the trail he would LEAP in the air and spin around. At half-QH, he could spin fast too. Again, with time and exposure and building our relationship, this faded and was no longer an issue.
Because you are experiencing confidence issues though, which are completely understandable, I would enlist the help of a friend or trainer to help you work through the problem together. Your horse needs to learn to trust that you will take care of him and you will not put him in a dangerous situation. You need to relearn to be that calm leading presence for your horse to rely on if he gets nervous.

Solaris -- 16 hh Appendix Quarter Horse = MY DREAM COME TRUE!
We Are Flying Solo