Sharp pain in the tooth suggests a diagnosis of pulpitis which means the pulp tissue in the tooth is inflammed. Please get yourself checked by a dentist and you may probably need to get a root canal done in that tooth.
However, if there is no cavity in the tooth, this could be due to sensitivity and a sensitivity toothpaste could be of great help to you.