I just posted this as a comment on the game, then decided it would go nicely in the game walkthroughs forum.
First of all, make sure you have every skill at level 5. If you don't, go back to easier battles until you earn enough experience.
With all your arrows fully upgraded, you can fight off the enemies without training or summoning a single unit. Do this and gain mana until you've bought everything and your maximum mana is 9999.
I like to use a trick where if you hold down a button and click into another window, the game will think you're still holding the button even when you start playing the game again. I like to hold down A, then hold down S, D, and F, but I don't start holding them at the same time. I press them in sequence so that my special arrows don't all land together. That way, the freeze and the shock won't cancel each other out.
Once your mana has filled up to 9999, start training units. I like to train units according to priorities. I make sure I can train a constant stream of angels, meaning I always have enough mana when the angel wait bar reaches full. I only train dragons when I have at least 6500 mana, so that I know I'll have enough for another angel. I also train a constant stream of wizards because they're pretty good in large numbers, and cheap enough to not make a dent in my angel funds.
Make sure your stream of arrows is reaching the farthest point it possibly can. And when your units are getting close to that point, stop the stream by pressing all four arrow buttons (A, S, D, and F). Make sure you start the stream up again immediately when the final boss comes in range. Sooner is better than later. Don't worry about hurting your own units, because the damage your arrows can deal to the boss is more valuable than the damage your units can deal.
Use your special power as soon as the boss comes in range. If you use it immediately as it becomes available again, you should be able to use it on the boss 3 times.
And remember to never stop training units once you've started.
(I saw on another Epic War topic that training hobbits can slow the boss down. I never tried that, but it sounds like a good idea since hobbits are so fast.)