Depression Detection Using ECG: Machine Learning
Thomala Gowthami
1
, Yennam Mary Poojitha
2
, Satri Tabita
2
, Yarrajodu Nandini
1
and Palle Sujatha
1
1
Department of CSE(AI), Ravindra College of Engineering for Women, Pasupula Village, Nandikotkur Road 518002,
Andhra Pradesh, India
2
Department of CSE, Ravindra College of Engineering for Women, Pasupula Village, Nandikotkur Road 518002, Andhra
Pradesh, India
Keywords: Depression, Mental Health, ECG, Machine Learning, SVM, Random Forest, CNN, LSTM, Heart Rate
Variability, Real‑Time Monitoring, Feature Extraction, Preprocessing, Physiological Signals.
Abstract: The major mental disorders affecting the society. The research utilizes electrocardiogram (ECG) signals
together with advanced Support Vector Machine, Random Forest, Convolutional Neural Network and Long
Short Term Memory based machine learning models to objectively predict depression using heart rate
variation, age, and other ECG derived features. With its promise of an early and precise detection of
depressive patterns, this method can well revolutionize mental health diagnostics with a noninvasive and cost
effective detection which can be brought into real time diagnosis and telemedicine. The major preprocessing
steps like noise filtering and normalization to improve the data quality and to automatically extract the features
as comparison to manual feature engineering are important which the key to this approach are. Additionally,
the system could be enhanced by the integration of other physiological signals, e.g. the EEG and the skin
conductance, which would allow the system to cope with ECG signal variability and to require high quality
data sets for the system to find robust and reliable implementations in real world applications.
1 INTRODUCTION
Depression is a common mental health disorder
characterized by a significant impact on one’s mood,
thought and physical well-being which can therefore
lead to major social and occupational impairment.
Traditionally, depression by us diagnose checking the
self-reported symptoms and by psychiatrists based on
a structured clinical interview. However, detecting
these early and accurately can be subjective, time
consuming and biased with the person’s experience
and they can be difficult approaches. As the need for
detecting depression, objectively, automatically and
by using data becomes even greater, for those who
may not seek professional help out of social stigma or
because of a lack of access to mental health care.
Recent biomedical signal processing advances
and machine learning methods, such detection of
depression has been enabled with physiological data
and Electrocardiogram (ECG) signals can be seen as
a possible biomarker in that process. Heart function is
closely connected to the autonomic nervous system
that, in turn, is strongly influenced by emotional
states: research indeed revealed that depression
dramatically modifies HRV and any other ECG
derived parameter. By studying these
variations in various aspects, machine learning
models are capable of classifying people as depressed
or not depressed, thus providing a reliable alternative
to such screening tests, which can otherwise be both
subjective and unreliable.
In this study, we develop a machine learning
based system for depression detection making use of
ECG signals. In the proposed work, ECG data is
collected, meaningful features are extracted, and
classification algorithms such as SVM, Random
Forest, CNN and LSTM networks are applied. The
high performance of these models is based on the use
of time domain, frequency domain and non-linear
features of ECG signals to identify depressive pattern.
In addition, deep learning techniques will be able to
extract features and features automatically reducing
the dependency on manual processing and therefore
classify better. This system can be implemented to
improve the early detection and to continuously
monitor depression in the clinical and home
environments in real time. IoT Enabled wearable
ECG devices can allow the integration in healthcare
232
Gowthami, T., Poojitha, Y. M., Tabita, S., Nandini, Y. and Sujatha, P.
Depression Detection Using ECG: Machine Learning.
DOI: 10.5220/0013925700004919
Paper published under CC license (CC BY-NC-ND 4.0)
In Proceedings of the 1st International Conference on Research and Development in Information, Communication, and Computing Technologies (ICRDICCT‘25 2025) - Volume 5, pages
232-237
ISBN: 978-989-758-777-1
Proceedings Copyright © 2026 by SCITEPRESS Science and Technology Publications, Lda.
to allow remote monitoring and Telemedicine
Applications, paving the way for scalable solution of
cost effective mental healthcare. This research seeks
to fill the gap between the psychiatric assessments as
is traditionally done and the modern tech ready
mental health diagnostics through exploitation of
machine learning and physiological signal analysis to
detect depression and improve accessibility,
efficiency, and reliability in diagnosis.
2 RESEARCH METHODOLOGY
2.1 Research Area
The methodology for depression detection using ECG
signals and machine learning follows a structured
approach, beginning with data collection and pre-
processing, followed by feature extraction, model
training, evaluation, and implementation. The steps
involved in the research methodology are as follows:
Data Collection: The ECG signal data is passed from
the publicly available datasets and clinical trials of
both depressed and non-depressed people. Wearable
ECG devices or clinical grade ECG monitors record
the data (or other corresponding physiological
indicators relevant to depression) to obtain heart rate
variability (HRV).
Preprocessing of ECG Signals: However, the
observed raw ECG signals are majorly corrupted by
noise and artifacts caused by muscle movements,
respiration, and external electrical noise. Data quality
improvement is done through the application of
preprocessing techniques like bandpass filtering,
denoising and normalization in order to increase the
feature extraction.
Feature Extraction: Depression related variations
are captured from ECG signals in the form of various
time domain, frequency domain and non-linear
features. Heart Rate Variability (HRV), RR intervals,
Power Spectral Density (PSD), as well as Poincaré
plot features are key features. The machine learning
models are used with these extracted features as
input.
Machine Learning Model Training: Initial
classification is done by using Supervised learning
algorithm like Support Vector Machines (SVM),
random forest, logistic regression, etc. Moreover, use
of deep learning models (specifically Convolutional
Neural Networks (CNN), and Long Short Term
Memory (LSTM) networks) for automatic feature
extraction and higher accuracy is made. To ensure
that the model generalizes properly, the dataset are
split into training and testing sets.
Model Evaluation and Performance Metrics:
Accuracy, precision, recall, F1 score and Area Under
the Receiver Operating Characteristic Curve (AUC-
ROC) are used to evaluate the trained models. We
apply cross-validation techniques so as to reduce
overfitting and improve the generalization.
Implementation and Deployment: The model is
thus implemented in an application or embedded in
IoT enabled ECG device for real-time depression
monitoring once validated. It is possible to integrate
the system with healthcare platforms for remote
diagnosis, and also provide continuous mental health
tracking.
2.2 Research Area
ECG signals utilizing machine learning can be used to
detect depression under multiple research domains:
biomedical engineering, artificial intelligence, mental
health informatics, and wearable technology. This
research is heavily dependent on biomedical
engineering for the reason that it requires
pathophysiological signal analysis to find the
biomarkers associated with depression.
The ECG signals have the capacity to offer
insights into mental health conditions through the
heart rate and the autonomic nervous systems activity.
Biomedical signal processing techniques can be used
to extract patterns that will distinguish depressed
individuals from healthy ones, making ECG a great
tool for mental health assessment.
This research is greatly supported by the artificial
intelligence (AI) and machine learning field, as it
allows us to detect depression using AI based data
driven model. The removal of subjectivity in
traditional clinical approaches to kidney function has
been replaced by objective, accurate, scalable and
highly accurate AI driven systems. Depression is
classified using Machine learning techniques, such as
Support Vector Machines (SVM), Random Forest,
Logistic Regression using ECG derived features. In
addition, the Convolutional Neural Networks (CNN)
and Long Short Termed Memory (LSTM) models are
deep learning models that enhance the classification
performance through automatic extraction of the
complex patterns in the ECG signals and diminishing
the requirement of the manual feature extraction.
Another major research area that merges
technology and psychology as well as psychiatry to
improve diagnostic and monitoring in mental health is
mental health informatics. To reach such a high level
Depression Detection Using ECG: Machine Learning
233
of detection and tracking for depression early and
continually, digital health solutions have been
developed and used physiological signals, mobile
applications and cloud systems. This research is part
of creating a non-invasive, real time ECG based
monitoring system to incorporate in mental health
informatics that can assist healthcare professionals for
relieving depression more effectively. It improves
diagnostic precision and provides a means of
monitoring the course of depression throughout the
time course of treatment.
Moreover, wearable technology and Internet of
Things (IoT) also increase the usage of this research
by its potential for monitoring depression in real time
in life as usual. With ECG sensors integrated into
wearable devices (like smartwatches, fitness band,
etc.), they can continuously be worn without the need
of clinical visits. Typically, these are IoT enabled
devices, which transmit ECG data to cloud based
platforms that can have AI models analyzing the
signal that can in turn generate the insights related to
mental health. By developing this addiction, they can
change the way depression is detected and found to
be accessible, less stigma, and be treated on time.
3 LITERATURE SYSTEM
The authors says that the work attempts to detect
depression using ECG signals through Convolutional
Neural Networks (CNNs) and Long Short-Term
Memory (LSTM) networks, as the study of deep
learning. This presents how it uses both of those
temporal and spatial ECG data features to distinguish
between depressed and non-depressed individuals.
The results report high classification accuracy, which
serves to demonstrate that deep learning has a large
potential toward automating mental health
diagnostics. Overall, this cycle of communication
with the sensor can empower healthcare professionals
to go beyond the score put forth by the questionnaires.
The authors discuss the statistical and
frequency domain features, the classifiers like
Support Vector Machines (SVM) and Random
Forest were utilized to identify depression
with the help of heart rate variability (HRV)
analysis. Through their study, they observe a
large correlation between lower HRV and
depression, therefore proving that HRV is an
effective marker to use when conducting
mental health assessments.
The authors of the study introduces the use of
a hybrid feature extraction method involving
the time domain, frequency domain, and non-
linear feature of ECG signals as the robust
indicators for stress and depression. Later on,
logistic regression and neural networks are
applied for classification with this approach.
According to their results ECG is shown to be
a viable and cost effective noninvasive tool for
mental health screening with possible wider
clinical field application.
The authors describe to improve depression
detection accuracy and since both ECG and
EEG signals contain information related to
anxiety and depression, I develop a hybrid
deep learning model that combines ECG and
EEG. This model is using CNN and BiLSTM
network to analyze both spatial and temporal
features. The research shows that combining
these physiological signals significantly
improves upon using ECG or EEG separately.
The authors describe an IoT framework for real
time mental health monitoring with ECG
signal based sensors and cloud analytics to
assess the depression risks. To develop the
remote healthcare interventions through a
deep learning model, the model processes
ECG patterns in order to detect potential
depressive episodes.
These studies collectively highlight the
effectiveness of ECG signal analysis for depression
detection, showcasing various machine learning and
deep learning approaches for classification and
monitoring.
4 EXISTING SYSTEM
Most of the present systems for depression detection
are based on psychological assessments, self-reported
questionnaires, and clinical interview with the mental
health professional. Depression symptoms are usually
evaluated by using the commonly used standard
diagnostic tools like The Patient Health Questionnaire
(PHQ-9), Hamilton Depression Rating Scale (HAM-
D) and Beck Depression Inventory (BDI). However
these methods are subjective since they rely on the
person’s self-perception and willingness to report
honestly his or her mental state. Consequently, it can
result in misdiagnosis or underreporting, especially in
people who are reluctant to have recourse to treatment
because of the stigma or unfamiliarity they feel being
stuck at home most of the time.
A few of the systems already in place include the
use of neuroimaging techniques like functional
Magnetic Resonance Imaging (fMRI) and
Electroencephalography (EEG) in order to more
ICRDICCT‘25 2025 - INTERNATIONAL CONFERENCE ON RESEARCH AND DEVELOPMENT IN INFORMATION,
COMMUNICATION, AND COMPUTING TECHNOLOGIES
234
objective depression diagnosis. However, these
methods are expensive, time-consuming, and not
suitable for frequent access in the case of routine
mental health monitoring. Moreover, they are fairly
complex and require specialised equipment to be
widely used in real world scenarios.
An alternative method consists of wearable
devices and smartphone applications that monitor
behavioral patterns such as those during sleep,
exercise, and also heart rate. Artificial intelligence in
these systems is applied to spot deviations from daily
routines which could suggest depressive symptoms.
However, these methods are usually indirect and thus
limit their utility in providing precise physiological
evidence for depression and can in fact mislead to
false positives or inadequate sensitivity for clinical
diagnosis.
The existing depression detection systems do not
have required accuracy, objectivity as well as tracking
in real time. However, there is a need for a more
reliable, noninvasive, and cost effective method, thus
increasing the interest to use physiological signals
such as ECG to detect depression due to its
functionality as a direct and measurable biomarker of
the autonomic nervous system.
5 PROPOSED SYSTEM
The objective of the proposed system is to develop an
automated, non-invasive and objective, a depression
detection framework based on the Electrocardiogram
(ECG) signals and machine learning based
techniques. Such system departs from conventional
methods based on traditional self-reported
psychological assessments or expensive
neuroimaging methods and takes advantage of the
ECG based physiological markers for measuring
depression with high accuracy. The system
determines patterns of autonomic nervous system
dysfunction, a key indicator of depressive disorders
by analyzing ECG derived feature such as Heart Rate
Variability (HRV).
A wearable ECG sensor is used to obtain real time
heart signal data that the system integrates. The
preprocessing of this data is done to remove the noise
and extract the time domain, frequency domain and
the nonlinear HRV parameters. Support Vector
Machines (SVM), Random Forest and Deep Learning
models, such as Convolutional Neural Networks
(CNN) and Long Short-Term Memory (LSTM), are
applied to classify a person as depressed or Non-
depressed given their ECG patterns.
5.1 System Architecture and Results
Figure 1: System Architecture.
The system as shown in figure 1 is aimed to work
with an IoT based cloud platform to enhance the
accessibility and usability by providing the remote
monitoring and real time analysis. The machine
learning model processes and returns the instant
depression risk assessments on the cloud server using
the ECG data being securely transmitted to it. If
abnormal ECG pattern indicating depression is
detected then the system can alert the healthcare
providers or person for early intervention and
continuous mental health monitoring. The proposed
system is overall an objective, cost effective and
scalable solution for depression detection. For the
application, machine learning is employed to utilize
ECG signals, thereby replacing any level of
subjectivity in mental health diagnosis by improving
diagnostic accuracy, as well as enabling real time
monitoring whether for clinical or personal
applications.
Figure 2 shows the Total Normal & Depression
Detection Records and Figure 3 shows the Run
Existing SVM output. Figure 4 shows the Run Propose
CNN Output. Figure 5 shows the Comparison Graph
of SVM and CNN.
Depression Detection Using ECG: Machine Learning
235
Figure 2: Total Normal & Depression Detection Records.
Figure 3: Run Existing SVM Output.
Figure 4: Run Propose CNN Output.
Figure 5: Comparison Graph of Svm and Cnn.
6 CONCLUSIONS
The implementation of detection of depression from
ECG signals using machine learning offers an
innovative method to replace conventional
depression diagnosis methods by providing an
objective, non-invasive real time depression
assessment. Depression detection as it is done
traditionally, relies heavily on self-reported
questionnaires or clinical interviews both of these
aspects of depression detection can be subjective and
can result in misdiagnosis. However, ECG based
detection takes advantage of the physiological
biomarkers including heart rate variability (HRV) as
measurable indicators of mental health status. This
system is improved by machine learning models that
help to distinguish the complex patterns of ECG
signal to detect depression in earlier and more reliable
way.
The system as proposed will integrate ECG
feature extraction with advance classification
algorithms that will give high precision in
discriminating the depressed and the nondepressed
people. The system allows the analysis of these ECG
signals by utilizing techniques, for instance, Support
Vector Machines (SVM), Random Forest, and Deep
Learning models such as CNNs and LSTMs that help
improve the accuracy and efficiency of the analysis
process. In addition, the system can be used as a
wearable or IoT-based device for continuous
monitoring leading to early intervention and reducing
the amount of load on traditional healthcare facilities
and transferable to realistic applications compared to
other existing systems that typically need expensive
neuroimaging techniques or indirect behavioral
assessments. It allows remote monitoring so that
people in danger of depression are not forgotten and
get to receive health intervention when required.
ICRDICCT‘25 2025 - INTERNATIONAL CONFERENCE ON RESEARCH AND DEVELOPMENT IN INFORMATION,
COMMUNICATION, AND COMPUTING TECHNOLOGIES
236
Furthermore, cloud based analytics brings in more
accessibility to the healthcare providers, as their
involvement in the mental health assessments is
decreased leveraging more data driven solutions.
Overall, we have made advances towards using a
machine learning driven ECG analysis for depression
detection. It then closes the gap between subjective
assessment and objective biomarkers to enable such
reliable, affordable, and preventive mental health care
solutions. Future work may consist in integrating
multimodal data sources, e.g., EEG and behavioral
data, to assist in the detection of mental health
conditions and provide an overall basis for mental
health assessment.
REFERENCES
Ansari S, Farzaneh N, Duda M et al. A review of automated
methods for detection of myocardial ischemia and
infarction using electrocardiogram and electronic
health records. IEEE Reviews in Biomedical
Engineering 2017; 10: 264-298.
Anthony H. Kashou, H. Basit, A. Malik,”ST Segment,”
StatPearls [Internet]. Treasure Island (FL): StatPearls
Publishing.
H. Wang et al. ST Segment Change Classification Based
on Multiple Feature Extraction Using ECG,” 2018
Computing in Cardiology Conference (CinC),
Maastricht, Netherlands, 2018, pp. 1-4, doi:
10.22489/CinC.2018.253.
I. Kayikcioglu, G. Uluta§ and T. Kayikcioglu,’
Timefrequency analysis based detection of ECG ST
segment change using large feature set,” 2017 25th
Signal Processing and Communications Applications
Conference (SIU), Antalya, 2017, pp. 1-4, doi:
10.1109/SIU.2017.7960408.
I. Kayikcioglu and T. Kayikcioglu,” ECG ST change
detection using Zhao Atlas Mark time frequency distri
bution,” 2017 Medical Technologies National Congress
(TIPt E k NO), Trabzon, 2017, pp. 1-5, doi-
10.1109/TIPTEKNO.2017.8238088.
I. Kayikcioglu, C. Kose and T. Kayikcioglu,” ECG ST
segment change detection using Born Jordan
TimeFrequency Transform and Artifi-cial Neural
Networks,” 2018 26th Signal Processing and
Communications Applications Conference (SIU),
Izmir, 2018, pp. 1-4, doi: 10.1109/SIU.2018.8404266.
J. Revathi and J. Anitha, A survey on analysis of STsegment
to diagnose coronary artery disease, in Proc. Int. Conf.
Signal Process. Commun (ICSPC), Jul. 2017, pp. 211-
216.
Mohebbanaaz, Kumar, L.V.R. & Sai, Y.P. A new transfer
learning approach to detect cardiac arrhythmia from
ECG signals. SIViP 16, 1945 1953 (2022).
https://doi.org/10.1007/s11760 022- 02155-w.
Mohebbanaaz, Kumari, L.V.R. Sai, Y.P. Classification of
ECG beats using optimized decision tree and adaptive
boosted optimized decision tree. SIViP 16, 695–703
(2022). https://doi.org/10.1007/s11760021-02009-x.
Mohebbanaaz, N. G. Rani and N. P. Kumar, "AttCNNnet:
Attention Based CNN Network to Detect Seizures from
EEG subjects," 2024 IEEE 16th International
Conference on Computational Intelligence and
Communication Networks (CICN), Indore, India,
2024, pp. 800804, doi:10.1109/CICN63059.2024.1084
7370.
Mohebbanaaz, Y. P. Sai and L. V. Rajani Kumari,
"Removal of Noise from ECG Signals using Residual
Generative Adversarial Network," 2021 IEEE 8th Uttar
Pradesh Section International Conference on Electrical,
Electronics and Computer Engineering (UPCON),
Dehradun, India, 2021, pp. 1-5, doi:
10.1109/UPCON52273.2021.9667595.
Thygesen, J. S. Alpert, A. S. Jaffe, M. L. Simoons, B. R.
Chait-man, H. D. White, and the Writing Group on
behalf of the Joint ESC/ACCF/AHA/WHF Task Force
for the Universal Definition of My-ocardial Infarction,
“Third universal definition of myocardial infarction,”
Circulation, vol. 126, no. 16, pp. 2020-2035, Oct. 2012.
Y. Kan and K. Kashihara, Automatic detection of ST
depression on ECG,” 2015 IEEE 4th Global
Conference on Consumer Electronics (GCCE), Osaka,
2015, pp. 655657, doi: 10.1109/GCCE.2015.7398704.
Y. Park, I. D. Yun and S. Kang,’ Preprocessing Method for
Performance Enhancement in CNN Based STEMI
Detection From 12-Lead ECG,” in IEEE Access, vol. 7,
pp. 99964-99977, 2019, doi: 10.1109/AC-
CESS.2019.2930770.
Depression Detection Using ECG: Machine Learning
237