Digital mammography (DM) has been considered as the primary modality for breast cancer screening. The relative amount of breast fibroglandular tissue, referred to as percent breast density (PD), has been considered as an important factor associated with breast cancer. We have developed and tested a robust method to accurately segment the pectoral muscle and the breast area using a deep learning approach. We use a U-Net architecture with a ResNet decoder to increase the depth of features. The architecture is trained using 555 DM images and tested and validated on an independent set of 555 images. The results show that our network achieves an average and standard deviation dice coefficient of 94.86% ± 1.93%, respectively, and sensitivity of 96.31% ± 1.87%. The method present here can be considered as the first step toward the automatic estimation of PD.