The epithalamus is a posterior segment of the diencephalon. The diencephalon is a part of the forebrain that also contains the thalamus, the hypothalamus and pituitary gland. The epithalamus includes the habenula and their interconnecting fibers the habenular commissure, the stria medullaris and the pineal gland.
The function of the epithalamus is to connect the limbic system to other parts of the brain. Some functions of its components include the secretion of melatonin by the pineal gland (involved in circadian rhythms), and regulation of motor pathways and emotions.