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.