The key is to do it gradually, dropping one feeding at a time over a period of weeks. If your baby seems resistant, try adding a fun activity, such as storytime, at the time he or she would normally breastfeed.
I'm assuming you are already pumping your breast milk and feeding it in a bottle. If so, then start mixing a small amount of formula in to the breast milk and increase the amount of formula each day until your have no more breast milk.
when I did the transition from breast feeding to formula I mixed the bottles half and half and slowly kept increasing the formula. And both of my kids kept gaining weight and didnt get tummy aches.
The easiest way I have found is to start by feeding breastmilk from a bottle and once the baby has become comfortable, start incorporating 1-2 bottles of formula per day.
Slowly make the transition to feeding the baby from the breast to feeding the baby from a bottle. Then slowly replace the breast milk in the bottle with formula.