milk drying up at 3.5 months ?!

sa
Help! So at my sons 3 month check up the pediatrician told me my son needed to gain more weight. So I started feeding him more often but then he started to eat only 10 minutes at a time vs 20-25. Fast forward a few weeks. We went into the pediatricians because I thought we might have thrush. We ended up not having thrush but the doctor still wanted him to gain more weight. So I decided to supplement with formula. Lately I've been noticing that I haven't produced much milk. I'm really upset I don't know why my milk is drying. I have been eating at least 1200 calories a day and o drink plenty of water. Is there anything I can do to stop my milk from drying up completely?