How does one get rid of tenesmus feeling?

Depends. If this is going on a for a while, you need to have a rectal exam to be sure the sensation is due to residual stool or hemorrhoids or possibly a tumor of the rectum. This is a must before embarking on any home remedies.
Follow a regimen. Adequate fiber diet, soft stools, kegel exercises. If this does not help, a short course of dilute anal Nitroglycerin ointment (0.2%) 2-3 times daily is often helpful.