How should I make a constant AC current source to drive an electromagnet?
Look at examples of an AGC circuit Automatic Gain Control (AGC) circuits
Theory and design paper

or 

Understanding Automatic Gain Control

Basically you need to sense the AC current with a sense resistor, amplify it and convert it to a DC value, the use a variable gain op-amp with a FET driven by the filtered DC value of the AC current to keep the AC current at a constant value. The filtering of the DC conversion of the AC current will need to have a time factor in order to be responsive enough to changes but not too responsive as to cause oscillations.