I recently caught a Clinton Anderson show on this exact issue. And the above suggestions is exactly what they did. They brought this horse near other horses and made him WORK. It was in Texas and if he was within 20 feet of another horse, they had him at a canter doing circles around the horses and just worked him hard.
They would offer to let him move away from the other horses and if he did and stayed calm, he got to walk and get loved on. The moment he reacted to other horses, it was back at the canter.
Now my gelding went through a phase of being buddy sour for the first time in 12 years. He likes my daughter's filly and thinks he is supper stud when she is in sight. The last two times I had issues this is what I did.
The filly was in the barn, tied and calling for him, he was trying desperatly to gallop to her. Cantering my half Arab into being tired would take hours, so we did other work, just out of sight of the filly at first. We side passed forty feet one way, then back three or four times. Then we did full turns on the forehand and turns on the rear.
Once he was working smoothly and a bit tired out of sight, we made sure to clear the people out of the way, and did the same thing inside the barn less than 30 feet from the tied filly. Half an hour of that and he didn't want to be bad anymore. Done for the day.
Four days later, I wanted to make sure this was fully fixed so I took him into the round pen with the filly being worked in hand by my daughter. Shaman and I worked for about 40 minutes to get a join-up, which usually only takes two or three with this horse. Once I got my join-up and let him rest and loved on him and asked my daughter to bring in the filly.
Now the round pen is currently inside the arena, so we turned the filly loose in the arena to run and be a horse. My gelding talked once to her and I sent him around the round pen again. This time it took almost an hour for me to get my join-up and by that time he was dripping in sweat. He has not noticed that filly exists since then. I have asked on two different days for a join-up and both times got it within two or three minutes.
This is what worked for me.