Don't give up on breastfeeding and please don't use the formula- as it will interfere with your supply.
A few things are going on here-
A) It takes up to 6 weeks for dairy protein to stop showing up in your milk- so unless you quit dairy when she was born, you have awhile to go.
B) the 6 week growth spurt- this makes everything harder. Once she's done with this, it will be more manageable.
Remember- even the best formula cannot compaire to your milk, even if you have the dairy proteins in it.
I had to give up dairy, eggs, chocolate, caffeine, wheat and gassy veg's for awhile. It is not fun, but is do-able. My baby is now 3 months and I can eat anything now (but always in moderation).
Other things to learn are soothing techniques. Dr. Sears' books have lots of great tips. I also found gripe water helpful, used a warm "rice bag" on his tummy in evening, etc. Look up colic- most of the tips should help a gassy baby too.
Good luck and hang in there- it gets better!