Get it good and wet, put in a LOT of conditioner, and then comb it VERY carefully - with a good wide-tooth comb, NOT with a brush. Start combing at the ends of the hairs (pick up the tail, and start combing, say, the last inch of the tail). Be gentle and use a LOT of patience. When you get the last inch combed out, then start combing a half-inch above that, and so on. Work your way up the tail that way. It won't do any good to start above a knot and try to comb down - that just makes the knot get even bigger and tighter.
With the mane, you might want to consider just roaching it - manes are shorter, so they grow out a lot faster than a tail does...also, they're not as critical to the horse's insect control as the tail is.
I use eqyss survivor detangler and they work second charm. Use that once a week and then use their avocado spray to fill in the other days and you will see a noticeable difference in hair length, strength and shine and they both detangle really well.
ANY kind of oil--I use corn oil from Aldi bc it's cheap. In this weather you'll want to bathe afterwards.
You'all forgot to mention--FINGER COMB the first time. It is the kindest way to start working out tangles. I think we had a thread that recommended using "Pink" to get out burrs. The tangles from burrs is just as horrible as your description!