Doxepin is classified as a tricyclic antidepressant (TCA). Its main function is to alleviate symptoms of depression and other mood disorders, such as anxiety. For some individuals with this type of mood disorder, they may have difficulty sleeping. In some cases, individuals are prescribed this medication as a sleep aid. These medications may increase the risk of suicidal behavior in children and young adults.