Do you know what kind of fibers your wig is made out of? If you have a really cheap wig... (like party city halloween wig cheap) some of those are just beyond saving and you should really invest in a better wig.
Assuming that you bought a nice wig, this would be my recommendation.
You're going to need:
Your wig
A wig stand (A Styrofoam head does wonders)
A ball pin -- > http://threadsmagazine.assets.tauntonnet.com/assets/uploads/posts/3830/120-pin-cushions-01_lg.jpg (Do NOT get a T-Head pin)
a squirt bottle
water / a tiny squirt of conditioner
and a comb with a pretty heavy tail.
http://www.comparestoreprices.co.uk/images/de/denman-anti-static-carbon-tail-comb--dc05.jpg <-- you can use these, but, I have difficulty using this kind
http://ecx.images-amazon.com/images/I/31TJme9nTrL._SL500_SS500_.jpg <-- Imo ones like these work better
Steps;
Make sure you securely pin your wig to the wig-stand. You only need to use a pin or two, and this will not damage your wig if you pin it.
In the spray bottle just use a teensy-tiny bit of conditioner and fill the rest with some warm-cool water. Do not use to much conditioner because if you do, your wig can end up looking greasy /oily afterwords. shake your concoction up!
Use the mist setting and spray your wig all over. It doesn't need to be soaking, but enough to get the wig a bit wet.
Holding the TEETH of the comb, you are going to use the tail part to actually detangle! Hold the comb with a loose grip. Enough to control what you are doing, but loose enough to let it bounce in your hand.
Gently tap with the end of the comb from the top of the head to the way down. Do not use a lot of force, just gently tap!
Continue to do this all the way down to the ends, and throughout until your wig is detangled!
This is usually what I have done / what my sister in law does and it works pretty well! Best of luck to you sad