“Distant Voices” is episode eighteen of season three of Star Trek: Deep Space Nine.
Dr. Bashir is having a conversation with Garak about his upcoming 30th birthday – something he isn’t looking forward to – when Quark approaches him with someone who wants to buy some prohibited medical supplies. Julian refuses, but when he returns to the infirmary, the prospective purchaser is already there, ransacking the place. When the doctor intervenes, he is attacked and falls unconscious.
When Bashir comes around, both the infirmary and the station are a mess, with most of the residents missing. The thief has apparently torn the place apart, and those that are left are behaving oddly. Bashir himself has also aged quite a few years whilst unconscious.
When communications are restored, they don’t manage to contact Bajor; instead, they hear the staff, including those that are supposedly on the station, discussing Julian’s health. He is actually in a coma, and will die within a matter of hours. The station’s staff that are still on the representation of DS9 that Julian is in represent elements of his mind, and he is rapidly ageing. Unless he manages to come out of the coma, by repairing the station, he will die.