For many years Buzz Aldrin kept an expenses receipt, carefully framed, on the wall of his study. Its message was simple: "From Houston to Cape Kennedy, Moon, Pacific Ocean. Amount claimed: $33.31." Thus the second man to walk on the lunar surface could recall, at his leisure, his reward from the National Aeronautics and Space Administration for flying to the moon 40 years ago. That flight, we should note, was made on a Saturn V rocket, which, at the time, was a meagrely tested tower of high explosives, while the astronaut and his companions had to navigate with a computer that had less memory than a modern mobile phone. For those efforts, Mr Aldrin was paid $8 a day, minus deductions for his free bed in his Apollo 11 capsule.

Given the bravery of the pilot and his fellow astronauts, such recompense now looks insulting. Yet, financial rewards would prove to be the least of the problems that beset Buzz Aldrin. He returned to earth with his fellow astronauts, Neil Armstrong and Mike Collins, as a hero and toured the world to meet kings and presidents. Then his life fell apart. His marriage to his childhood sweetheart, Joan Archer, broke up. He remarried in haste and was divorced again within two years. His military career ended after an unhappy stint as commandant of the air force test-pilot school. (Mr Aldrin had never been a test pilot and had instead flown fighter planes in Korea.)

"For the first time in more than 40 years I had no one to tell me what to do, no one sending me on a mission. Rather than feeling an exuberant sense of freedom, I felt isolated, alone and uncertain," he recalls. He ended up working at a Cadillac dealership in Beverly Hills but failed to sell a single vehicle in six months. Mr Aldrin later was involved in a car crash, and successfully called on Alcoholics Anonymous; he has been dry since 1978.

Details of this decline are chronicled with unsparing honesty by Mr Aldrin, now 79, in his newly published memoir, Magnificent Desolation: The Long Journey Home From the Moon, which he has written with Ken Abraham. (The title comes from his description of the lunar landscape, which he stepped on to exactly 40 years ago this Monday.) His painful self-analysis also contrasts starkly with the approach to fame taken by his Apollo 11 crew-mate, Neil Armstrong, the first man to step on the moon. Mr Armstrong has remained monosyllabic about his feelings and now leads the life of a virtual recluse on his Ohio farm.

Mr Aldrin attributes his descent into alcoholism and depression to two factors. The first was his status as "the second man on the moon", a standing as an also-ran that still clearly rankles. As Michael Collins - the pilot who flew the Apollo 11 capsule around the moon while his two crew-mates walked on its surface - observed: "I think he resents not being the first man on the moon more than he appreciates being the second."

Simple pique might seem an unlikely reason for such a decline. We should note, however, that personal crises enveloped nearly all the astronauts who made it to the moon's surface. Charlie Duke, who flew on Apollo 16, became a rage-fuelled drunken bully until he found God. Al Bean (Apollo 12) turned himself into an artist, although he only paints variations of a single scene, the lunar surface; while Ed Mitchell (Apollo 14) claimed he had glimpsed "a cosmic intelligence" as he returned to earth and set up the Institute of Noetic Sciences to study this great being. In this company, Mr Aldrin's behaviour looks average.

In any case, there is another influence involved, he argues: familial depression, a condition for which there seems to be ample evidence in Mr Aldrin's background. Born in January 1930, he was the only son of a highly ambitious oilman of Swedish stock, a wartime colonel and a strict and unsympathetic father. At first, Mr Aldrin - who was born Edwin Aldrin, the Buzz coming from a sister who mispronounced "brother" as "buzzer" - did only moderately well at school. But as he notes, "failure wasn't an option in my family," and he was browbeaten until he left high school with grades that were good enough for West Point. Such paternal interference is not recalled fondly by Mr Aldrin, who remembers his father as an "overbearing tyrant".

By contrast, his mother, Marion - whose maiden name, remarkably, was Moon - emerges as a much more vulnerable character. She took her own life, from a drug overdose, because she could not handle the pressure of her son's achievement, he says. Her father had also committed suicide - he shot himself - as did "several other close relatives in our family". Thus, genes may have played a role in triggering the "blue funk" of his post-Apollo depression, Mr Aldrin says.

Not that there was much hint of this at West Point. Mr Aldrin excelled academically and athletically, became a fighter pilot in Korea, where he flew 66 combat flights and shot down two enemy Mig jets. Then, in 1963, he joined the United States' fledgling astronaut corps and was assigned to Nasa's Gemini programme, the precursor of the Apollo missions. He piloted the Gemini 12 flight and carried out a flawless space walk that was crucial in developing the orbital rendezvous techniques that were later used on Apollo. As a reward, he was given a crew slot on Apollo 11 and was originally selected to be the first to set foot on the moon - only to be replaced later because Nasa felt Mr Armstrong would be a better bet at handling the pressures of fame - a reasonable supposition, it later transpired.

Then, on July 16, 1969, after more than a million spectators had gathered around Cape Canaveral, a giant Saturn V blasted Mr Armstrong, Mr Aldrin and Michael Collins to the moon, which they reached on 20 July. Mr Armstrong and Mr Aldrin climbed into Apollo 11's lunar module, fired its engine and dropped slowly towards the moon. With 60 seconds of fuel left, the Eagle had still not touched down as Mr Armstrong, icy-cool, picked his landing spot with care. He settled on a tiny corner of the Sea of Tranquillity - with only seconds of fuel remaining.

"I remember just patting him on the back," Mr Aldrin says. Oddly, Mr Armstrong has a different memory. "We shook hands," he insisted on recent BBC TV. Mr Aldrin countered: "Maybe it was both." This lack of consensus is intriguing and reveals the gulf that has grown between the two men. Mr Aldrin and Mr Armstrong have rarely met or spoken since returning to earth. After an hour and a half on the lunar surface, the pair climbed back into their lunar module and, after attempting to take a few hours sleep, huddled in their spacesuits in the tiny craft, blasted off to rejoin Mr Collins in orbit round the moon. Then it was back to earth - and that calamitous fall from grace that occurred as if "the earth were punishing him for his impudence in leaving it," as Andrew Smith put it in his book Moon Dust: In Search of the Men Who Fell to Earth.

In fact, Mr Aldrin - who has since legally adopted Buzz as his legal first name - has recovered well from the ghosts that haunted him in the 1970s. Today he is bronzed, silver-haired and happily married to his third wife, Lois, whom he met in 1988 at a singles party in Laguna. He travels the world evangelising about the possibility of manned missions to Mars; made a cameo appearance on The Simpsons; marked the 40th anniversary of the moon landing by rapping with Snoop Dogg; and in one epic encounter, when approached by a film producer who accused him of faking the Apollo 11 landings, punched the man firmly on the jaw - which, given that Mr Aldrin was already in 70s, seems a rather impressive response.

On Monday, Mr Aldrin - together with a half-dozen other Apollo crewmen (but not Mr Armstrong) - will gather at Nasa's Washington headquarters for a press meeting to commemorate the first lunar landing 4 decades ago. All the astronauts are now in their late 70s. Each was a child of the 1930s, and it is chilling to realise how old are our lunar pioneers. How many will still be with us at the great 50th anniversary of 2019 remains to be seen.

What is striking is that Mr Aldrin - despite the descent into depression and illness that crippled him during his return to earth - now looks as likely to be a survivor then as any of the rest. * The National