You could create an invisible unit to do the mining for you. This unit would be invisible, invulnerable and unselectable so will always mine. Using triggers, when mine is finished you create such a dummy unit and order it onto the mine. This unit will need triggers to kill it when the mine dies.
A pure trigger solution like Legal Ease suggested would probably be the most reliable. Remember to only turn it on when at least 1 such mine exists, otherwise it should be off to save resources.
Such a shame Warcraft III does not have automatic harvester support like StarCraft II has.