Just remember...this too shall pass. My son in infancy was horribly colic and had many digestive issues. I cut down my diet until I figured out what made him fussy (It was dairy for him) but only for a few months (their digestive systems grow out of things). I would suggest giving her probiotics (If you have a Savemart, the brand is Lifestart, it is amazing!) It will help her belly! Give her 1/2 teaspoon once or twice a day until it improves, and then cut down to 1/4 teaspoon once per day. Also, if you are into natural teething remedies, Chamomilla 30C is a great teething remedy,also at Savemart by Boiron. You can also pick up Hylands teething tablets, or in dire need, Childrens Ibuprofen I've found works better than Tylenol for teething pain because it is also an anti-inflammatory. Just my opinion, but 5 months old is early to start food, it will overwhelm her little tummy. Just remember, it is a stage, babies immune systems are not fully developed until 2 years old, so things can certainly change!
I have always been told (and experienced) that 3 days of solid consistency can usually change a bad habit for a baby. Some experience a few more days, and some less. If you are going to change something for her, stick with it and don't give in or waiver, it will be that much harder next time. I know it is very daunting and exhausting to have a screaming baby that will not relent! If you put in the hard work for a few days, you should have good results. I have friends that waited until they got older to break bad habits, and it is WAY HARDER! At three months old my first son threw crying and screaming fits, my husband took him and put him in his crib for time-outs every time (I thought he was totally ridiculous for putting a three month old in time-out) but wouldn't you know, a few days later, he quit, and never revisited that behavior! (at 6 years old now, he is a good sleeper) Babies are smart, they quickly figure out how to get what they want through certain behaviors. Don't forget they only have their cry and screams to express pain / discomfort.
Hang in there! :)