Defibrillation works by delivering a controlled electric current to the heart , which depolarises a critical mass of the heart muscle , which stops the arrhythmia and allows a coordinated heart rhythm to return . Defibrillation consists of delivering a therapeutic dose of electrical energy to the affected heart with a device called a defibrillator . This depolarizes a critical mass of the heart muscle , terminates the arrhythmia , and allows normal sinus rhythm to be reestablished by the body 's natural pacemaker , in the sinoatrial node of the heart .