A Tory MP has announced he will step down at the next election after being heckled by angry constituents.