Question: why did the 12th doctor die?
Answer: The Doctor was electrocuted by a Mondasian Cyberman just before his escape to 507 Solar Farm. This triggered the initial regeneration however he was subsequently shot a dozen times by various energy weapons before blowing himself up to save the day.