Through intense devotion, Arjuna remembered the teachings of the Geeta, and viewed himself as the Atman.
The Pandavas renounce the Kingdom after finding out that Krishna has left and dissolve the sense of attachment with the body and the world.