If you are a fan of fishing, you can catch the Crystal Serpent magic weapon in the Hallow (40 Damage, similar to crystal bullets). Other then that, there is the 3 Spellbooks - Crystal Storm, Golden Shower (Crimson Exclusive) and Cursed Flames (Corruption Exclusive) all of which are available before defeating any mechanical bosses.
As to the mage gear, I would recommend one of the hard-mode ore sets with the appropriate helmet. After that, you could move to Hallowed > Chlorophyte > Spectre > Nebula (Endgame).