Only the body is subject to pleasure and pain

All beings in the three worlds, including the gods in heaven, have a body that is subject to the dual forces.

Whether one is ignorant or one is wise, as long as one is embodied, the body is subject to happiness and unhappiness, pleasure and pain.

By enjoying satisfying objects, one experiences pleasure, and by deprivation (hunger, etc) one experiences pain. Such is nature.

If the Self, which is the reality and which is pure is forgotten, even for a moment, the object of experience attains expansion.

If there is unbroken awareness (of awareness), this does not happen.

Even as darkness and light have come to be firmly associated with night and day, the experience of pleasure and pain has confirmed the existence of the body in the case of the ignorant.

In the wise however, even if such an experience is 'reflected' in consciousness, it does not produce an impression.

As in the case of a crystal, the wise man is influenced only by the object when it is actually and physically present nearby. But the ignorant person is so heavily influenced, that he broods on the object even in its absence.

Such are their characteristics: thinned out vulnerability is liberation, whereas dense coloring of the mind is bondage.

Bondage is none other than subjection of the jiva (individual) to pleasure and pain: when such subjection does not exist, there is liberation.

The jiva (individual) gets agitated at the very sight of pleasure and pain. However, if through Self knowledge it realizes that pain and pleasure do not exist in truth, then it regains its equilibrium (balance).

Or, if it realizes that these do not exist in itself nor does it (the jiva) exist in them, it realizes total freedom.

If it realizes that all this is nothing but the one infinite consciousness, then again it attains equilibrium.

Like a lamp without fuel, it does not get agitated again, for the jiva (individual) itself is then realized as a non-entity and it is reabsorbed in the consciousness of which it is but the first thought-emanation (the 'I' thought).

The Concise Yoga Vasistha - pg 350 to 351. ISBN 0-87395-954-X.
World's 2nd longest poem (20'000 verses), a treatsie on consciousness.