Try this: triarii in the middle, tree men deep, only a phalanx can breach that line (they will hold on indefinitely), on their flanks rorarii (they can stand their ground surprisingly long) and put all your hastati and principes on the flanks (pretty much Cannae formation). It works with all factions. Thin line of spearmen in the middle, heavy & assault infantry to the flanks. One more thing: always try to ensure overwhelming cavalry superiority. With spearmen like triarii, you can anchor many more infantry than your own, and if you ensure that they are aligned without holes in the line, trust me, they wont break. Follow the teachings of Hannibal and Alexandros (with a fine combined army, for cavalry, go with Surenas, or Genghis!
Ya know i actually used something similar to this in my MTW2 Stainless Steel Roman/Byzantine campaign. Scoutari spearmen in the middle, Swordsmen on the flanks, had like 6 units of Calvary 2 Light Calvary, 2 Calvari (Missile Calvary with compound bows) and 2 Cataphrants (heavies). with supporting archers behind the line infantry.

Getting good calavary reserves is a bit tricky in EB though lol.