This is an idea that was popularised by CS Lewis, who said:
"I am trying here to prevent anyone saying the really foolish thing that people often say about Him: I’m ready to accept Jesus as a great moral teacher, but I don’t accept his claim to be God. That is the one thing we must not say. A man who was merely a man and said the sort of things Jesus said would not be a great moral teacher. He would either be a lunatic - on the level with the man who says he is a poached egg - or else he would be the Devil of Hell. You must make your choice. Either this man was, and is, the Son of God, or else a madman or something worse. You can shut him up for a fool, you can spit at him and kill him as a demon or you can fall at his feet and call him Lord and God, but let us not come with any patronising nonsense about his being a great human teacher. He has not left that open to us. He did not intend to. ... Now it seems to me obvious that He was neither a lunatic nor a fiend: and consequently, however strange or terrifying or unlikely it may seem, I have to accept the view that He was and is God."
LunaticThe preacher at the service I attended said Jesus was not a lunatic because he was not ranting. This struck me as a very narrow definition of lunatic - just as Lewis' considers someone a lunatic only at the level of thinking himself a poached egg.
In reality, there are any number of mental illnesses that leave the sufferer delusional, but not ranting, and I would suggest that delusional to the extent that a person believes himself a poached egg is way beyond the delusion that you are the son of God.
A Fourth OptionThe option that Lewis never considers is that Jesus' words and actions were made up. He starts from the assumption that the Bible is true, and then concludes that his faith in the Bible is justified. About as circular as you can get!
For example, Lewis seems to hold that Jesus claimed he always existed, based on John 8:58: "Jesus said to them, ‘Very truly, I tell you, before Abraham was, I am.’" May be Jesus never said that; it was made up subsequent to Jesus death to enhance the legend of Jesus as God.