There is nothing worse than seeing your baby in pain. A lot of times new borns are in pain due to simple gas in their stomach. They get gas for few reasons. They get gas because they are gulping a lot of air from the bottle, they gulp air when they cry. They may have a food from the breast milk or the formula may not agree with them and they got a lot of gas pains.
You could notice that the child is having a lot of gas if you see them with a great deal of distention in their stomach and you see them bringing their knees up to their stomach to show that they are kind of crunching and reacting to the abdominal pain.
The best way to rid the gas is to help them burp and you can do that by simply burping them in this manner but which is under the chin, patting their back. Sometimes putting a baby with bad gas over the shoulders is actually helpful because the shoulder bone can press into the abdomen gently but firmly enough that it actually helps to expel some of the gas. So you can put them over your shoulder with the shoulder bone pressed into the abdomen.
You can put them over your knees so your knees pressed in their abdomen helping them to relieve some of the gas. If that's not working, you can try to find an over the counter gas drops. Basically there are brand like Mylicon and what they are a little baby Gas Ex. They are gas drops that take the bubbles in a baby's stomach and really reduce them and then helps stop the crying.
You could also try switching the nipple on the baby's bottle. Sometimes the nipples let out too much milk and that give a lot of gas or they let out too little milk and the baby is really sucking furiously gulping too much air when they do so.
If these at-home remedies such as burping, mylicon bottle, changing the way you feed a baby don't really get rid the gas then you may need another formula or modification on the baby's diet and that's the best for talking to your doctor. Baby's gas is very uncomfortable but by six months most of the gas is gone away because the GI system is more developed and all of this cries will be a thing of the past.