welcome to health care magic!
Your presentation is similar to
anal fissure. it is a condition in which there occurs an
injury to the inner epithelium of the
anal canal, so, when ever one passes stools, there is "sharp pain". This condition respond to stool softeners, like one you had taken. Along with medical treatment,
soft diet like kitchdi, curd, dalia, lots of salad and veggies help in softening the stools and there by helping the site to heal soon. this diet also helps in preventing further development of fissures.
it is also good to avoid strong spices for some time. In my clinical experience, in case of consistent pain, one can temporarily use anaesthetic gel locally for relief. usually anal fissures resolve with these measures but still if it disturbs please
consult doctor again.
Hope this is helpful for you. Feel free to ask if you have any more questions.
Dr. Manisha Gopal