While on an IFR flight, a pilot has an emergency which causes a deviation from an ATC clearance. What action must be taken?