Generally Metformin is avoided in lactating mothers because a fraction of it may pass through breast milk will reduce blood glucose of infant. Chances are less but it's a risk. So consult endocrinologist for
thyroid, weight gain, irregular periods and other issues. Hope he will solve your issues in better ways. Wishing you and your baby good health.