Elon Musk considered taking his own life when he was 12.

The 52-year-old tech mogul experienced an "existential crisis" after burying himself in religious texts and German philosophy books, which left him "quite depressed" and questioning his existence.

Speaking to the New York Times’ Aaron Ross Sorkin at the DealBook Summit 2023, he recalled how he thought as a pre-teen: ‘It is all pointless? Why not just commit suicide? Why exist?' "

He added: "The German philosophy books. made me quite depressed. One should not read [Arthur] Schopenhauer and [Friedrich] Nietzsche as a teenager."

But he then turned to Douglas Adams' 'The Hitchhiker's Guide to the Galaxy' and realised finding the meaning of life doesn't have a simple answer, but raises questions that people should be asking.

He said: “"The point that Adams was making there was that we don't actually know what questions to ask.

"My motivation then was, well, my life is really finite … but if we can expand the scope and scale of consciousness then we are better able to figure out what questions to ask about the answer that is the universe and maybe we can find out what is the meaning of life."

The Tesla founder - who has previously admitted to being bullied as a child and has a strained relationship with his father, Errol Musk - admitted his mind “often feels like a very wild storm” because he constantly has a “fountain of ideas” running through it.

Asked if it was a "happy storm", he paused then said: “No.”

He added: “I think to some degree I was born this way, but it was amplified by a difficult childhood, frankly."

And even when he has "happy moments" as a child, he still felt “a rage of forces in [his] mind constantly.”

He added: “These demons of the mind are, for the most part, harnessed to productive ends... Once in a while, they, you know, go wrong.”