With the continuous development and improvement of the level of medical technology in our country in recent years, the treatment of epilepsy has been constantly updated and developed. Nerve electrical stimulation is considered to be a very effective method for treating epilepsy with anxiety and depression. There are many traditional methods for the treatment of epilepsy. For example, vagus nerve stimulation (VNS) has been applied earlier, and the therapeutic effect has been confirmed, but it will cause serious complications and is easier to be uncomfortable; deep brain stimulation for epilepsy is still in the immature stage, and there is no final conclusion. Therefore, this article proposes a clinical study on the treatment of patients with epilepsy with anxiety and depression based on the electronic medical nerve stimulation of the Internet of Things. First of all, this article uses the literature method to study the causes of epilepsy and previous treatment methods. Then, we designed an experimental study of epilepsy with depression based on the Internet of Things electronic medical neuroelectric stimulation therapy and selected the core quality of life questionnaire, SDS, and SAS as observation indicators. Finally, the comparison of epilepsy symptoms and depression and anxiety between the control group and the observation group before and after treatment was analyzed. The results of the experiment showed that, among the 50 subjects in the study, the observation group that used electrical nerve stimulation therapy had 5 people who stopped seizures after treatment, accounting for 10%, while in the control group of traditional drug treatment methods, after treatment, only one person stopped the seizure, accounting for 2%. In addition, the SAS and SDS scores of the observation group were also lower than those of the control group. Therefore, the use of nerve electrical stimulation to treat epilepsy with anxiety and depression symptoms has better performance and can help patients recover as soon as possible.