I would give a Citronella anti-bark collar a try. Daisy had the same issues you described - went nutzo when she saw another dog, barking like mad and pulling on the leash trying to get at them. (to sniff and play, not to fight!) It was embarrassing and made walks very unpleasant. I got the collar (I'll link below), and it was a freakin' miracle!
The collar sprays a shot of citronella when they bark. The spray is directed away from the dog, it does not shoot them in the face. The idea is that the sound, smell and sight of the spray startles them enough to stop the barking. I only used it when we were taking a walk, and Daisy set it off exactly 4 times and was cured. Each time it went off, it scared/startled her and she stopped barking. If she wasn't barking, she wouldn't try to pull and lunge at the other dog, since those two actions were tied together in her beagle mind. The funniest thing is that she figured out just how much noise she could make without setting it off - a cute little yip
After a few weeks, I would put the collar on for a walk, but didn't turn it on. Seeing it before I put it on her and the feel of it on her neck was enough. After a few more weeks, I just carried it with me in case she regressed.
It's been a year, and she will now bark a little, but not bad. I can always start using the collar again if I need to. I don't keep it on her all the time - I feel like beagles need to bark as part of their nature, so if she's in the house, she can yap her head off if she sees a rabbit out the window
It's called Spray Sense,(the older version is called Gentle Spray), and you can get them many places on the net. I got mine from a guy on ebay. If you're going to get one, the best deal is to get the one with the extra can of spray and the extra batteries. Be sure and turn the collar off when not in use to save battery life - they are not cheap! Here's a link to the guy I got mine from:
ebay seller for Spray Sense