I plugged my arduino mega through a power jack to a 15v power supply (with correct polarity) and I have a 100kohm potentiometer connected to: 5v, A0, GND for PWM controlling.
The problem is when I rotate the pot to the zero position the voltage regulator gets fried and this happens already on two different Megas.
The other weird thing is that the board still works (and LED's are lighting normally), how could that be!.
Sounds like you wired the potentiometer incorrectly. If the wiper is connected to 5V or GND, turning the potentiometer to one of the extreme positions will result in a short.
Look, while you can power a UNO or Mega 2560 to as much as 12 V via "Vin" or the "barrel jack" - as long as nothing else is connected, it is a very poor start. Sooner or later, you are going to want to connect something that takes more than a few (tens of) milliamps at 5 V and the poor little on-board regulator will not cope.
While you have it connected to a PC via USB, it can pass up to 500 mA (less whatever the microcontrollers use) through to the "5V" pin, but as soon as you require more current or disconnect it from the PC, you need a real 5 V regulated supply to power all your 5 V devices and the Arduino as long as it is not connected to the PC, via the "5V" pin.
Hi, @shamooooot
Can you please post image(s) of you project showing your component connections.
It sounds like you have your pot connections the wrong way round.
Moreover, it's a pot without a switch, and OP has indicated he has one with a built-in switch. It's likely that the switch, and how it was wired, is part of the problem.