If it is an aggressive type of going crazy than I had a similar problem with three horses that I trained and got all three of them to stop. All three were caused by something else and I can try to summarize them below.
The first one was a young ottb stallion who stopped racing because of breathing problems (they do not impact his jumping career they only show up if he canters or gallops for a very long time). What caused him to be aggressive when encountering other horses was that he was used for breeding when he was racing and he got excited when a mare passed and competitive when he passed a gelding or stallion.
The next one was a gelding who I trained as a surprise for a friend. His problem was that even after he was gelded he was treated like a stallion (he was not interacting with other horses) he was turned out alone etc. because of that he was very teritorial and he would attack other horses.
The last one was a mare who was aggressive towards other horses for no particular reason she would just kick them as they passed.
All three of these horses now continue to compete with a red ribbon in the tail just in case they kick someone but they generally stopped. What I did was I would say the word no if they were making meen faces at other horses and if they would leave the horse alone I would reward them, if they would actually kick or attempt to kick the other horse after I said no I would ask them to do a move that they didn't like for example backing up worked.
It's probably a slightly aggressive act. I would start by tying a few horses in a good size closed in space. Then ride her around making lots of turns to keep her mind on the job. Then add to it have those horses be walked around while you do the same riding pattern making lots of turns. Then trot then canter then canter while they trot and eventually canter while they are cantering too. Hope this helps