I EBF and my baby had CMPA. The problem is, the prescription formula tastes horrible and babies don't take it. Even formula fed babies find it hard to adjust to the dairy free stuff. They're also thinner and can often cause reflux. There are also different formulas - some have dairy broken down more, and only one or 2 actually have zero dairy (and they are the most problematic and GP won't prescribe it at first).
If you genuinely suspect CMPA, stick with breastfeeding for now. Cut dairy AND soy for a good 3 weeks. Be very, very strict otherwise it's a total and complete waste of time and effort. Dairy builds up in the system, yours and baby's. A bit of dairy here and there will still cause a reaction and you won't be able to tell for sure why. If you see an improvement, stick with the dairy free diet, and trial dairy again in 6-8 weeks time after symptoms have gone. If symptoms return, go back to being dairy free.
We managed to include dairy in my diet at 6 months (had tried at 4 months and failed, reflux and tummy aches came back instantly and horribly). My DS is 18 months now and is doing the dairy ladder, he has successfully had baked dairy this week, so there is hope!
Note it's very rare for babies to react to the dairy in breastmilk as it's quite broken down already. At 5 weeks, there could be a whole host of other reasons for the issues. Which is why I think you need to be very strict with the dairy free amd soy free diet because if you see no improvement, you will know for sure it's not the dairy and can move on quickly.