Several options, actually.
Mongoose has a mass combat system in their product line (I know the revised version appears in Book of Strongholds & Dynasties, but I am not sure where else it appears).
Malhavoc has Cry Havoc, a book on adding war to your D&D games. It has a pretty comprehensive system.
AEG has Empire, a book on managing domains that includes mass combat rules.
WotC has a kind-of mass combat rules set in the Miniatures Handbook, but it entirely minis oriented and most people don't consider it "mass" enough for what they want in a true mass-combat system.
WotC also has Heroes of Battle, as noted. This one is a bit different, as it does not include any true Mass Combat rules. Instead, it focuses on how the PCs actions could affect a large battle taking place in the background.
Green Ronin's Advanced Player's Manual uses the rules from Cry Havoc.
Green Ronin's Testament offers a mythic type of Mass Combat system, where the heroes are able to defeat units of soldiers single-handedly. The related book, the Trojan War, offers a revision to 3.5 if I recall correctly.