Cardiovascular diseases (CVDs), including abnormal arrhythmias and congestive heart failure, are a leading cause of mortality worldwide, with electrocardiogram (ECG) signals serving as a critical diagnostic tool. This study introduces a novel approach for classifying diseases in ECG signals into three categories: normal sinus rhythm (NSR), abnormal arrhythmia (ARR), and congestive heart failure (CHF). The classification is based on a combination of features extracted from both the time domain (mean and standard deviation) and the frequency domain (power spectral density and spectral centroid) of the ECG signals. Additionally, energy values from selected frequency bands are utilized. To enhance the model's robustness, incorporate data augmentation techniques, including time-shifting and flipping of the signals. These augmented datasets are then employed with various classifiers, and an optimization process using grid search is applied to enhance the classification performance. This methodology presents a promising framework for automated ECG signal analysis, The results of the proposed work have been exceptionally promising, showcasing a remarkable specificity rate of 99.7% and achieving an accuracy level of 99.58%. These findings hold significant promise for advancing early detection methods and enhancing patient outcomes in the realm of CVDs.