Hi
It is not uncommon to have anus swelling and tenderness with severe constipation because of impacted hard stools in the rectal area.
you need to avoid risk factors for constipation. You should drink more liquids, regular exercise,avoid refined carbohydrate diet, if needed use stool softners like docusate sodium etc, consume more fiber diet, psylium husk, if it is chornic constipation, find out the underlying metabolic or systemic cause.
More swelling leads to more pain in the anus and that leads to inhibition of defecation reflex and that leads to more stay of stools in rectum and sigmoid colon and that cause more constipation and cycle goes on.
you can use glycerine suppositories, to facilitate stool passage through the anal canal.
Some times it is hemorrhoides in the naus because of chronic or severe constipation that feels like swelling in that area.
If problem persists, please have physical evaluation by local physician.
Best wishes for your health
MD
Diplomat American Board of Family Medicine