BackgroundEpilepsy stands as an intricate disorder of the central nervous system, subject to the influence of diverse risk factors and a significant genetic predisposition. Within the pathogenesis of temporal lobe epilepsy (TLE), the apoptosis of neurons and glial cells in the brain assumes pivotal importance. The identification of differentially expressed apoptosis-related genes (DEARGs) emerges as a critical imperative, providing essential guidance for informed treatment decisions.MethodsWe obtained datasets related to epilepsy, specifically GSE168375 and GSE186334. Utilizing differential expression analysis, we identified a set of 249 genes exhibiting significant variations. Subsequently, through an intersection with apoptosis-related genes, we pinpointed 16 genes designated as differentially expressed apoptosis-related genes (DEARGs). These DEARGs underwent a comprehensive array of analyses, including enrichment analyses, biomarker selection, disease classification modeling, immune infiltration analysis, prediction of miRNA and transcription factors, and molecular docking analysis.ResultsIn the epilepsy datasets examined, we successfully identified 16 differentially expressed apoptosis-related genes (DEARGs). Subsequent validation in the external dataset GSE140393 revealed the diagnostic potential of five biomarkers (CD38, FAIM2, IL1B, PAWR, S100A8) with remarkable accuracy, exhibiting an impressive area under curve (AUC) (The overall AUC of the model constructed by the five key genes was 0.916, and the validation set was 0.722). Furthermore, a statistically significant variance (p < 0.05) was observed in T cell CD4 naive and eosinophil cells across different diagnostic groups. Exploring interaction networks uncovered intricate connections, including gene-miRNA interactions (164 interactions involving 148 miRNAs), gene-transcription factor (TF) interactions (22 interactions with 20 TFs), and gene-drug small molecule interactions (15 interactions involving 15 drugs). Notably, IL1B and S100A8 demonstrated interactions with specific drugs.ConclusionIn the realm of TLE, we have successfully pinpointed noteworthy differentially expressed apoptosis-related genes (DEARGs), including CD38, FAIM2, IL1B, PAWR, and S100A8. A comprehensive understanding of the implications associated with these identified genes not only opens avenues for advancing our comprehension of the underlying pathophysiology but also bears considerable potential in guiding the development of innovative diagnostic methodologies and therapeutic interventions for the effective management of epilepsy in the future.