No there's no pill, you should probably see a phycyatrist who can diagnose a more serious ailment, but it might just be the result of an overactive imagination, you should still see a professional anyways though, especially if the voices are telling you to do potentally harmfull things.
I also searched for years and years to understand why theses voices spoke IN (not outside) my head. Come to find out I have DID (or multiple personality disorder). These voices were other alters of mine. I wasn't going crazy after all. With the help of a good therapist and faith in the Lord, live is good. Hang in there and google MPD and see if you can relate to this interesting condition.