Thanks for query.
As you got severe pain
during passing motion,you might be having Fissure in ano
Consult surgeon and get examined and get it diagnosed whether it is piles or fissure in ano.
In both the conditions avoid constipation
Take more green leafy vegetables containing more fibers.
Take plenty of water.
Apply some analgesic
and antibiotic cream.
Ok and bye.