Season 6 Episode 6 - Abyss
Jack is blended with a Tok'Ra who gets him captured by the Gou'ald. The Tok'Ra commits suicide to prevent its knowledge from falling into enemy hands and Jack is tortured for the information by the System Lord Ba'al, being killed repeatedly then resurrected by a healing sarcophogus. Daniel Jackson in his ghostly energy state visits Jack in his head to keep him sane. It turns out that the combination of Jack with the symbiote gave it Jack's desire to rescue people...including the slave the symbiote used to gain information Ba'al. Although Daniel is apparently powerless to interfere, Teal'c comes up with the plan to alert another system lord about Ba'al's secret base and Jack takes advantage of the diversion to escape, rescue the slave, and get back to SG Command.