Yes, you can take some antidepressants during pregnancy and while breastfeeding.
Research in 2017 has shown that the risk of adverse effects to an infant is typically low or nonexistent. However, it's important to discuss any possible effects with your doctor or OB-GYN.