If the rpm's are surging, I would check the Idle Air Control Valve. You also might want to check fuel pressure to ensure your fuel pump is not failing.
RepairPal Certified shops can diagnose and repair your 1997 Honda Civic. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.