Arduino mega won’t power on via usb

Hi I am building a 3d printer from scratch using arduino mega 2560 with ramps 1.4.

While I was doing some tests(I had connected a 12v psu onto the ramps and I had also connected my mega to the pc via usb cable I had not plugged in the extruder or the heated bed).It worked fine at first but suddenly the voltage regulator on the arduino started smoking.After that every time I would plug the arduino to the computer the on led would not light up and the over current protector would heat up like hell.

Does any body know why this happened? It is crucial I know why it happened so I do not fry the next one too.

I also tried to replace the regulator with this: L7805CV but it did not seem to work either the board wold do exactly the same thing.I also noticed that the terminals 1 and 2 where the regulator was are now sorted what does that mean for my board?

Any help would be really appreciated.