How do I tell my supervisor that I've been offered a job and want to leave?
There is no reason for it to be confrontational. It is a sad situation, not a confrontational one. Just say that you are leaving and have considered your options.
Don't get talked out of what you want to do. If the person is angry, that is on them, not you. Say you are sorry, but determined.
Make some effort to clean up unfinished work that impacts on others if that is at all possible.