highjinks sounds like a horrible time you've been having, also you too yogamummy. Sounds like you've both had dsome completely duff advice from the healthcare professionals :(
highjinks Have you seen a qualified lactation consultant at any point? They are really fantastic generally, and might be able to help check for any other problems that might have gone unnoticed and which might contribute to her low weight gain and general unsettled-ness -e.g., tongue tie, oral variations or something else that's impeding her feeding. Re the 5 minute feeding in the day, this can be normal - babies can get quite efficient as they mature: my DS was only feeding for 5 minutes by about 6 weeks of age and my DD never fed for longer than about 5 minutes either, unless she was sucking herrself to sleep.
Small syringe direct into the baby's cheek is the best way of getting ranitidine down. Second the suggestion about putting dummy in immediaitely after. She'll also be less able to spit out the ranitidine if you keep the syringe in her mouth while she swallows. Alternatively, you could mix it with some EBM in a bottle but she might be put off by the peppermint/ alcohol taint in her milk, which is not exactly what you need!
YOu mentioned you'd cut out dairy and it had made a dramatic difference - have you carried on with that? Dairy is hidden in everything and exclusion needs to be complete IME e.g., nothing with whey in it, nothing with skimmed milk powder or any alternative mammalian milks (e.g., goats') in etc etc etc, but you've probably thought of all that. Soy is another common allergen for babies with cow's milk protein problems - often they go together and so it could be worth cutting that out for a while to see if it makes a difference. If you're going to do this long term I would see a dietician to ensure you're getting adequate nutrients yourself.
In the short term, do you have any EBM in the freezer? If so, I would recommend conscripting a relative or friend, getting them round to do a full night duty while you catch up on sleep. Invest in some wax earplugs from boots, ram them in, don't feel guilty and shut yourselves away.
yogamummy sounds like things are picking up for you - that's good.
And finally some good news from our household....DS is now 7 months, and after a horrendous first few months and some sleep training he is now a happy, contented baby albeit with a few ongoing feeding issues but completely easy to parent. And I never thought I would say that a few months ago!