The presented study discusses the possible disturbing effects of the electromagnetic field of antennas used in mobile phones or WiFi technologies on the pacemaker in the patient’s body. This study aims to obtain information on how the thickness of skin layers (such as the thickness of the hypodermis) can affect the activity of a pacemaker exposed to a high-frequency electromagnetic field. This study describes the computational mathematical analysis and modeling of the heart pacemaker inserted under the skin exposed to various electromagnetic field sources, such as a PIFA antenna and a tuned dipole antenna. The finite integration technique (FIT) for a pacemaker model was implemented within the commercially available CST Microwave simulation software studio. Likewise, the equations that describe the mathematical relationship between the subcutaneous layer thickness and electric field according to different exposures of a tuned dipole and a PIFA antenna are used and applied for training a neural network. The main output of this study is the creation of a mathematical model and a multilayer feedforward neural network, which can show the dependence of the thickness of the hypodermis on the size of the electromagnetic field, from the simulated data from CST Studio.