This paper approaches a new model for arrhythmia diagnosis based on short-duration electrocardiogram (ECG) heartbeats. To detect 8 arrhythmia classes efficiently, we design a Deep Learning model based on the Focal modulation layer. Moreover, we develop a distance variation of the SMOTE technique to address the problem of data imbalance. The classification algorithm includes a block of Residual Network for feature extraction and an LSTM network with a Focal block for the final class prediction. The approach is based on the analysis of variable-length heartbeats from leads MLII and V5, extracted from 48 records of the MIT-BIH Arrhythmia Database. The methodology's novelty consists of using the Focal layer for ECG classification and data augmentation with DTW distance (Dynamic Time Warping) using the SMOTE technique. The approach offers real-time classification and is simple since it combines feature extraction, selection, and classification in one stage. Using data augmentation with SMOTE variant and Focal-based Deep learning architecture to identify 8 types of heartbeats, the method achieved an impressive overall accuracy, F1-score, precision, and recall of 98.61%, 94.08%, 94.53%, and 93.68% respectively. Additionally, the classification time per sample was only 0.002 s. Therefore, the suggested approach can serve as an additional tool to aid clinicians in ensuring rapid and real-time diagnosis for all patients with no exclusivities.