I would suggest getting a good detangler, like Cowboy Magic or Eqyss Survivor. Put it on the mats and rub it around, wait 10-15 minutes and then start working on them. I love CC Ice on Ice but I don't know if it would help for super big mats. If they are too tight or too painful, they will need to be cut out.
She really needs to be groomed daily with a leave-in conditioner or detangler (Ice on Ice is what we use) to prevent matting. Mats can be super painful and can cause skin irritation and even sores.
Good luck with your baby, hope she doesn't need to be shaved again.