Thanks for writing your query.
After reading your post, it seems that you may be suffering from anal fissure
It can be confirmed by clinical examination.
Following may be helpful :-
1. Sitz bath.
2. Avoid spicy foods.
3. Use of laxative.
4. Eating fibre rich foods.
5. Use of topical anaesthetic.
6. Use of Nitroglycerine ointment locally.
I would suggest that you should get yourself clinically examined and investigated.
I hope this is helpful to you.