I'm pretty sure all you have to do is just annotate in Pokemonforms.txt the typing of the Mega Evolution, and it should completely change its typing based on that. For example:
[MEW-1]
FormName=Mega Mew
MegaStone=Mewnite
Type1=???
BaseStats=100,100,100,100,100,100
Abilities=PRESSURE
This...