Thanks for writing your query.
After reading your post it seems that you might be suffering from anal fissure
. In this, there is breach in the continuity of yhe lining of the anal canal
resulting in bleeding and pain while defaecation. You should get yourself examined by an anorectal surgeon.
Following methods wiil be helpful :-
1. Avoid spicy foods.
2. Avoid constipation
by taking fibre rich foods and laxatives and stool softeners.
3. Doing seitz bath that is sit in a tub filled with lukewarm water. Put some antibacterial solution in the water like betadine
lotion. You should sit such that your anal region should be immersed in water. Repeat this procedure at least twice a day.
4. Applying local anaesthetic
gel for relief of pain or gel containing Nitroglycerine.
5. Taking antibiotic to prevent secondary infection after consultation with your doctor.
I hope this is helpful to you.