Tiny implant could relieve pain, depression