DFU mode can help you recover your iPhone or iPad using a computer.
You can't turn off the proximity sensor on your iPhone, but if it's malfunctioning, try force-restarting your iPhone and ...