In general, we use the word “seizures” to describe what people experience—sudden spells when someone loses awareness or becomes disoriented. We use the term “epilepsy” to describe an electrical pattern in the brain—usually diagnosed by an electroencephalogram or EEG. Not all seizures are due to epilepsy, and not all electrical epilepsy in the brain results in a seizure.
People with mood disorders are more likely to experience seizures of both kinds—seizures that are due to epilepsy and seizures that are not. And it seems that the relationship flows in both directions: having a mood disorder increases the risk of seizures, and having seizures increases the risk of a mood disorder. We understand only a little about the specifics of those relationships. For example, epilepsy in the temporal lobe of the brain may be more strongly linked to mood disorder or mood changes. You’re certainly right that the brain is a complex thing!
Some of the medications used to treat bipolar disorder, like lamotrigine or valproate, were originally developed to treat epileptic seizures. That is more evidence of the relationship between mood disorders and seizures. But, again, it is complex: not all anticonvulsant medications (medications for epileptic seizures) are effective for the treatment of mood disorders.