Accidentally unplugged USB during upload, now no sketch can be uploaded. Help!

Select the port of the Mega from the Arduino IDE's Tools > Port menu. If no port appears for the Mega with it plugged in to your computer then try restarting your computer.