"Um labirinto da morte", de Philip K. Dick
Sinopse de Wikipedia:
The plot revolves around fourteen colonists of the planet Delmak-O.
They are: Betty Jo Berm, a linguist; elderly Bert Kostler, settlement
custodian; Maggie Walsh, a theologian; Ignatz Thugg, who oversees
thermoplastics; Milton Babble, a physician; Wade Frazer, a
psychologist; Tony Dunkelwelt, a geologist; Glen Belsnor, who
specialises in telecommunications; Susie Smart, a typist; Roberta
Rockingham, a sociologist; Ben Tallchief, a naturalist; Seth and Mary
Morley, a marine biologist couple; and Ned Russell, an economist.
[...]
One by one, the characters Tallchief, Smart, Berm, Dunkelwelt, Kostler
and Walsh either kill themselves or are killed under mysterious
circumstances.
[...]
All of them, including the colonists thought to be dead, awake to find
that they are actually the crew of the spaceship Persus 9, stranded in
orbit around a dead star with no way of calling for help. Their
experiences had been a kind of virtual reality, a computer-generated
religion that synthesized their beliefs. Their dormancy should save
energy of the ship's life support systems for the unlikely case
someone would detect the stranded ship and rescue them. It becomes
clear that they already completed several cycles of virtual reality
dormancy, due to the gradual disintegration each more nightmarish than
the previous one.