Congenital heart disease (CHD) is a critical global public health concern, particularly when it comes to newborn mortality. Low- and middle-income countries face the highest mortality rates due to limited resources and inadequate healthcare access. To address this pressing issue, machine learning presents an opportunity to develop accurate predictive models that can assess the risk of death from CHD. These models can empower healthcare professionals by identifying high-risk infants and enabling appropriate care. Additionally, machine learning can uncover patterns in the risk factors associated with CHD mortality, leading to targeted interventions that prevent or reduce mortality among vulnerable newborns. This paper proposes an innovative machine learning approach to minimize newborn mortality related to CHD. By analyzing data from infants diagnosed with CHD, the model identifies key risk factors contributing to mortality. Armed with this knowledge, healthcare providers can devise customized interventions, including intensified care for high-risk infants and early detection and treatment strategies. The proposed diagnostic model utilizes maternal clinical history and fetal health information to accurately predict the condition of newborns affected by CHD. The results are highly promising, with the proposed Cardiac Deep Learning Model (CDLM) achieving remarkable performance metrics, including a sensitivity of 91.74%, specificity of 92.65%, positive predictive value of 90.85%, negative predictive value of 55.62%, and a miss rate of 91.03%. This research aims to make a significant impact by equipping healthcare professionals with powerful tools to combat CHD-related newborn mortality, ultimately saving lives and improving healthcare outcomes worldwide.