The birth of a preterm infant and the hospitalization in a neonatal intensive care unit (NICU) add extra functional and emotional demands to the typical transition to motherhood. Therefore, the prevalence of peripartum depression (PPD) among preterm mothers is especially high. As optimism was found to be a mediator of the association between social support and depression, the current study aimed to test this mediation in the population of NICU mothers. A sample of 128 Israeli mothers of 214 NICU hospitalized infants filled out self‐report questionnaires regarding background variables, social support, optimism, and PPD symptoms. As hypothesized, optimism was found to partially mediate the association between social support and PPD symptoms among mother of preterm infants. The higher the perceived social support reported, the higher maternal optimism reported, and in turn, the lower PPD symptoms reported. In accordance with the Transactional Stress Theory, social support and optimism reflect maternal secondary appraisals that impact the way mothers of preterm infants cope with the challenging situation of a preterm birth and NICU hospitalization. Healthcare professionals should encourage preterm mothers’ use of social support to increase optimism and reduce the risk of developing PPD.