Well, there are several things you can try that might help. In the meantime you can cheer yourself up that if he still has that many mages sitting in his capital, at least he hasn't used them before, fighting you in the field.
Things you might try:
* If he has only his mages left, and not enough troops to plug the gate, you could try to have something fast and hard hitting (cavalry, giants, many sacreds,... ) sitting as much forward as possible, to sweep through the gate and kill everything on their way before his mages have time to stop them. They will obviously take damage, but if you're fast enough losses will be acceptable. This will not work if he has enough chaff (or battle summons) to prevent you from smashing through the gates and into his mages in the first few turns.
* If he does still have an army, and you have enough mages yourself you can try to out-brute force him. Raining evocations (or other massive damage spells. Master Ensave is obviously ideal, but not allways possible to pull off) on his troops, with the goal to have him break before you do. Expect heavy losses. (Depending on the strategic situation, and the composition of your forces you might even not care too much if you loose all your troops, as long as your mages survive, and you conquer the forces. If your army is difficult to replace (sacreds, high resources, expensive summons, or the like) this option becomes very painful. )
* Flight is very good when storming castles. Ideally the version giving flight to the entire army, (forgot what it is called now, with the changes) but giving flight to, say, a dozen elephants/hydras/Vans/... can be really nice too. Any kind of flying thugs (wether they're given flight in battle, or are able to fly naturally or through equipment) can cause a lot of damage in his backfield, and if you're lucky even prevent his troops from plugging up the gate. Skellespam or the like will very often surround the thug, and let the gate wide open for you to march through. Set a significan portion of your army on attack rearmost, and cause mayhem amongst his troops & mages. As an added benefit, if you have your troops inside the walls, mingled in among his, he'll hurt his own troops with his AoE spells.
* If you have (or can make) a SC (almost) immune to everything your oponent can do you can send him in on his own, and clean out. Making a SC immune to
everything is essentially impossible, but immunizing him to what your oponent can do might be feasible. If you fought your way to his capital you should have a good idea of what he can do.
* If his mages aren't too beefy, you can send in some mages of your own (with a little bodyguard maybe) and try to kill them using battlefield wide spells like earthquake or rain of stones. If your guys have the means to survive those spells themselves, and are not to fatigued they can be scripted to retreat afterwards. If not you can award them a medal for saving many lives with their suicide mission. A similar effect can be attained by using battlefield enchantments, but this takes a bit longer to actually kill the enemy. (technically you can have your caster cast the BE and retreat, leaving just some troops behind to have the BE last, but this is considered an exploit by many. Myself I allways leave my caster in the battle) Take along a number of bodyguards, preferably quite beefy and immune to the spell you're using, and set up in a far cornor of the battlefield so you're hopefully out of range of the enemy mages, (no such luck if he has lots of astral...) and it will take a while for his (non-flying) troops to reach you. The air queens/fire kings with boosters, with a bodyguard of the elementals they can summon themselves while you siege the enemy fort are quite ideal for this job.
* There are a lot of spells that will diminish the damage the oponents mages can cause, depending on your own magic. Gaining 50% resistance to an element, or +4MR can greatly increase the life expectancy of your army. Mistform protects against the first hit of pretty much everything, regeneration diminishes the chance of afflictions, and will help a lot against spells that cause their damage in little amounts, such as many battlefield enchantments.
In the end, while there are a number of things you can do to minimize the damage you take, storming a well defended enemy capital is likely to hurt. Especially if he has not used his research mages in battle against you before. Remember that in dominions everything can be killed, and don't grow too attached to your troops. Plan the attack to the best of your ability, swallow your losses, and move on.
Edit: Damn, I was planning to mention assessins, but forgot while typing. Assessin spells might very well not work (well) though, as he's likely to have domed his capital in one way or another.