Allow the Players to Scheme
During the actual battle make sure that the player's plans either come to fruition or are dashed, but make sure to address them. Their preparations should have real and concrete effects on both the battle as a whole, and the skirmishes that the players take part in.
Break it up into Parts
Large battles should have at least 3 different segments to show just how immense they really are, but feel free to have epic battles with far more segments.
The Larger Battle Affects the Heroes
A more complex method is to employ a variation of the performance combat rules. Assign a score to how the battle is going for our heroes, from -3 to +3. This score is known as a "Tide of Battle" score, and is applied as an untyped bonus to our heroes during attack rolls, CMB rolls, skill checks, and saving throws. It represents not only the morale boost of winning, but also shouted warnings, "invisible" flanking partners littered across the field, unseen arrow volleys, and general strategic advantage. As our heroes accomplish or fail at tasks, make sure to adjust the tide of battle score.
Some characters, such as bards, clerics, and spellcasters are able to affect a large number of creatures at the same time. For heroes using these abilities, for example a bard using inspire courage or a sorcerer using stone to mud under a horde of enemies feet, apply temporary adjustments to the Tide of Battle Score as you see fit. After all, imagine how much more effective a bard is if he is giving bonuses to 50 people instead of 5.
Example: Storming A Castle
The battle begins, but almost immediately there are problems. The large gate in the outer walls is guarded by a group of trolls, and none dare go near them. Our heroes must fight these trolls, then plant and arm a small bomb on the gate to blow it open.
Within the first wall is a moat, and the drawbridge is up. Our heroes must make swim checks to swim across the moat, then climb checks to get to the drawbridge controls. Every round of checks is another round of arrows that our heroes must deal with.
Within the drawbridge control room, there is a token force, and a puzzle for our heroes to figure out (Knowledge Engineering helps greatly). When they have pulled the correct levers, the drawbridge comes crashing down.
The drawbridge is lowered, but a gigantic magical siege engine is tearing our troops apart. Our heroes get to the siege engine, and must endure infinite waves of enemies until they deal the siege engine enough damage to destroy it.
Enough is enough. Our heroes decide it's time to end this battle and kill the king. Our heroes weave their way through chaotic streets, first making stealth checks to avoid arrow fire, then making perception checks to locate the king.
The fight against the king and his guard is straightforward. Once he is killed, our heroes may take his head and ride through the streets, making intimidate checks to cause enemies to throw down their weapons.
Example: Defending A Castle
The gate is holding, but the enemy has brought siege ladders. Assign each hero onto siege ladder, and give them five rounds of one mook a turn. At least the heroes know exactly where the mooks are coming from. Fire or a good strength check will destroy a ladder or push it off into oblivion.
Here come the siege towers! Our heroes have 2 turns to destroy the approaching structure, or else out pop a band of ogres!
Our commanding general has taken a poisoned arrow. Make acrobatics checks to get to him in time, then defend him against infinite enemies as a party member treats him. This only ends when his poison is cured or he dies.
The combat on the walls has gotten intense, and those defending the cannon have fled. A fighting retreat has been ordered, but the heroes may take a few turns of Disable Device or Knowledge Engineering to transform the remaining gunpowder into a bomb. For each attempt, the heroes must deal with another round of arrows.
Defend the King! Our benevolent ruler finds himself face to face with the BBEG, and it is up to our heroes to defend his highness. Our heroes are halfway across the battlefield, but a couple of riderless horses are milling about. Fly, run, ride, or teleport, but get to the king as quickly as possible and defend him!