The Rite of M'al Sharran, meaning "Last rite" in Goa'uld, is a deadly Jaffa rite in which the symbiote of a warrior is removed, depriving him of its natural healing abilities. The absence of the immune system causes the Jaffa to relive important moments in his or her life, tracing the key paths they took over their lifetime. Frequently, this allows them to reassess themselves if they have been compromised by an external source, such as Goa'uld brainwashing, as they look back on key events in their lives and determine whether they truly believe what they have come to believe or if this belief was forced on them.
In 137 years, Bra'tac had only performed the rite twice, and both times the Jaffa died, but he was certain their hearts were freed. Teal'c, number three, was fortunately the exception after he was brainwashed by Apophis, his relieved memories allowing him to retrace the events that lead to him realizing that Apophis was not a god. (SG1: "Threshold")
The Jaffa Maz'rai also underwent his own Rite of M'al Sharran after he had realized he was brainwashed by Ba'al - even sealing himself away from his fellow Jaffa so that his symbiote would not be returned to him by another until he was sure that he was freed of the brainwashing - but died in the attempt. (SG1: "Stronghold")
A similar process was used by Colonel Everett Young to release Colonel David Telford after he was brainwashed by the Lucian Alliance, Young locking Telford in a compartment on board Destiny and venting the atmosphere, causing Telford to suffocate before he was resuscitated so that his real personality could reassert itself. (SGU: "Incursion, Part 1")