A person who is freed from these three gates of darkness, O son of Kunti, practices what is best for the self, and from that reaches the highest goal.
Explanation
Krishna has just named desire (kāma), anger (krodha) and greed (lobha) as the three gates to hell, and urged giving them up. Here he says that a person freed from these three gates of darkness (tamas) acts for their own true good (śreyas) and so reaches the highest goal (parāṃ gatim). Traditions differ on what that goal is, such as liberation or union with God, but all agree it is the supreme end.