The Constitution does not explicitly address such scenarios as dementia; however, the most likely course of action would be for the representative to either resign voluntarily or face significant pressure from their party and constituents to step down. 
WE NEED AN AMENDMENT!!