It is unclear from your post whether your puppy is being hand-raised or is still with its mother. If you are hand-raising, it is important to know whether you are bottle feeding or tube feeding. However, based on the information you have given, I suspect one of the following things could be contributing to your puppy's condition:
1) When hand-raising a neonate puppy, you must stimulate the puppy to urinate and defecate. Failure to do so can cause distension of the abdomen and discomfort. To stimulate, take a paper towel moistened with warm water and gently (but firmly) rub the anogenital area until the puppy releases urine and bowels.
2) Overfeeding can cause a bloated, distended stomach and diarrhea, esp. If tube-feeding.
3) Giving the wrong formula. A poorly tolerated formula can cause gas and stomach irritation. My preferred formula for puppies is Esbilac. ( If you decide to switch formulas, transition slowly or you will give your puppy diarrhea)