Doctor Who: 12x11 The Lonely God

The Doctor is tortured by an unknown enemy, forced to watch everyone she's ever known leave her over and over again in a simulation. Can she free herself and find out who this foe is?