Ok, here's the bad news. If he's really a good optimizer and he sees this as a competition, you're boned. No, really, you are. At that level, casters Win at D&D, unless there's some houserule I'm not seeing about Epic Spellcasting not existing and also ordinary spells being somehow fixed.
The good news: with such a high level and gestalt, it's trivial to put together a build with full spellcasting, full BAB, and the most necessary PrC you will ever find in Epic, the
Void Incarnate. Seriously, you want that prestige class. Now, if you can talk to your DM to make sure he's not looking at this as a competition and discuss your character options, it's possible to have a melee-centric build work out, because the DM can structure things around that.
The other news: We're gonna need a lot more work put into a skeleton than just melee power in epic levels with virtually no guidelines. This kind of build takes weeks to put together, and nobody here has that kind of free time to put in. What I recommend is figuring out your own class levels, feats, and wealth, posting that, and then asking for tips to hone what you've already put together. You'll end up with a character closer to what you want to play, and we'll do less unnecessary work. Everybody wins. Plus, otherwise, you're gonna end up with links to Pun-Pun as a serious suggestion. Or Chuck, or a Hulking Hurler, or whatever other TO crap somebody thinks of. Cause they're within the scope of what you've requested.
EDIT: See that up there? That build technically does everything you asked for, but it's probably not what you had in mind.