It will take a lot of patience, you need a detangler and spray a small section and start with your finger at the root and untangle it then comb it.
I use Ice on Ice,
Chris Christensen Systems, Official Site, Internationally Renowned Canine Grooming Products Used By Top Show Dogs!. You could go to a pet shop and see what they recommend. If it is too badly matted, it might be eaiser to have her shaved down. Good luck. Poor baby.