Railway Board chairman AK Mittal has resigned after two train accidents have occurred in Uttar Pradesh in only four days.