I'm looking for a TV series episode or a movie (more likely to be an episode) which I have seen many years ago (early 2000s, but could be older).
The crew of a spaceship gets sick without a reason one after another and they are dissolving/dying. They try to find a cure but without success. Somehow the ship is unable to maneuver and is stuck in its position. They manage to send an SOS signal, which is noticed by another ship coming to their position. When they arrive, the whole ship itself has dissolved and left nothing behind, and the rescue ship wonders what may have happened here. Plot twist was that the ship coming to rescue them was the very same ship that initially had the problems, so one of both must have been doppelgangers or something like that.
I believe it might have been from Star Trek or Stargate but can't find anything about it.