Achieving and escaping the Brahmaloka - Samyutta Nikaya 46.54

The Buddha Gotama answered the question, what is the purpose of love, kindness and friendship?

The cultivation of mindfulness as a condition for enlightenment may be undertaken with love, kindness and friendship, for they share the following conditions: curiosity, energy, enjoyment, peace, concentration and equanimity result in detachment and dispassion. Detachment and dispassion results in logical, non-instinctual behavior, a freedom from distress. This permits a person to master their perception: they can see something as beautiful or repulsive, or not beautiful or not repulsive, or somewhat beautiful and repulsive and somewhat not beautiful and not repulsive. Equanimous, mindfully and clearly aware, a person may understand that freedom from distress is truly beautiful, worthy of love, kindness and friendship. Such excellence represents the perfection of this freedom from distress: such a person, having achieved this mastery, can no longer become distressed by what is repulsive or beautiful.

Yet if a person does not achieve this excellence and proceed toward arahantship, they shall wake from this world into the Brahma world, as if from a dream. How does a person escape the distress of the Brahmaloka? How, then, does a person perfect their arahantship, having perfected their freedom from distress, and avoid the Brahmaloka (to achieve the purpose of practice directly)?

The person must apply their enlightenment to the resentment of all forms, their resentment of all sensory reactions to those forms, their disregarding of perceptions of diversity through monoism. Consider the infinitude of space, the limitations of perception, the limitations of knowledge. Achieve the perfection of the jhanas, and entering the loka of infinite space through love, kindness and friendship for the infinitude, for the limitations of knowledge, abandon sensory reactions to form, abandon all form. Formless, embody joy through enjoyment of joy; love by loving Love.

This state of love, this state of joy, is none other than the contentment that arises from the perfection of wisdom after enlightenment. Yet the work is not yet done: having embodied love and joy, pass utterly beyond consciousness. Think upon the thought of thinking, thinking upon thinking, think: "there (in this thought of thinking), there is nothing." This is the achievement of wisdom which permits the final attainment of contentment: for one who truly understands this, there can be no longer any discontentment.