There could be two issues here. If the engine seized due to over heating that could cause a number of problems and should be addressed first.
Idle surging typically is due to some type of vacuum leak. This could come from a broken vacuum hose, leaking intake, brake booster leak or a stuck idle air control valve. Once the vacuum leak is found and repaired then the engine base idle can be set and the surge should go away.