"Terminus" is a science fiction short story by Polish writer Stanisław Lem first published in 1961 in the collection Księga robotów [pl].
Pirx becomes a spaceship captain, and his first appointment is an old renovated ship which had been destroyed in a collision with a meteor swarm nineteen years ago, and its crew had perished, marooned without oxygen.
Unfazed with the macabre situation, Pirx, typical of his personality, looks for a rational explanation of why would a primitive "iron madman" seem to suffer from PTSD.
[1] Wojciech Orliński describes the story as a superb example of the transfer of the macabre atmosphere characteristic of Stefan Grabiński, a "Polish Poe", to science fiction.
A gigantic, empty ship, rusty machinery, a murky past and dusty pilot seats set the mood at the very beginning.