It is interesting to note that almost all spiritual masters have their names beginning with Swami and ending with Ananda. But ananda or happiness is the birthright of all beings in both the upadhi upahitha and upadi rahitha, the embodied and the disembodied state. The Upanishads also declare that it is through happiness that all living beings come to birth, it is for happiness that they live, and it is in happiness that they merge at last. In Taithireya Upanishad it is mentioned that Brahmananda is the greatest happiness in the world, i.e. the happiness attained through Brahmahood. In yoga, happiness is accepted as the most healthy and positive state of the heart. But according to the religious point of view happiness involves all the positive qualities of the heart resulting in love and freedom.
Children are comparatively happier than the rest of the age groups. There are many cases of decreasing happiness with increase in age. Spiritual masters are also subjected to this to a slight extent as long as they are in their physical bodies. Christ and the mahatmas often taught that God can only be won through the heart which is similar to that of a child. This implies that children are the happiest beings in the world and evidently, the state of happiness is Godhood itself.
Happiness comes through the relief from pain also. In some cases pain and happiness act as two sides of a coin. Normal functioning of sex especially the psychological aspect of it, is also related to the gaining of happiness as far as the physiological criterion is concerned. In certain interpretations the birth of opposite genders is meant for gaining ananda. But naturally happiness is the very nature of the female class.
Dharma is the basis for happiness and vice versa only when living beings are happy that they follow dharma: worldly happiness is related to vasanas and ignorance like ego and the undesirable and negative qualities of the mind. Spiritual happiness is gained by the absorption of mind through sadhana like pranayama, meditation, laya samadhi, bhava samadhi, and the climax of all spiritual efforts, the raising of kundalini. Happiness can be gained, to a very great extent, through the singing of music and kirtans and also listening to them. Anyway the net result of happiness is supreme peace and freedom.