To get to your question, the antidepressant potential of ketamine was discovered serendipitously in patients receiving the drug for the treatment of complex regional pain syndrome, or CRPS, a miserable condition characterized by severe pain, swelling and changes in the skin.
CNN: Is it safe to use ketamine as a pain drug?