Recollections by surviving Beatles and second wife Olivia cast new light on the emotional intensity that drove his music

Previously unseen private letters, home movie footage and intimate personal recollections of George Harrison are set to radically correct public perceptions of "the quiet Beatle" in a new documentary by Martin Scorsese.

Revelations include the fact that Harrison's widow, Olivia, struggled to keep the relationship with her wayward husband on track. In the film Eric Clapton also talks about how he felt consumed with envy as he fell in love with Pattie Boyd, Harrison's first wife.

Scorsese, who has focused his camera in recent years on musical subjects, from his history of the blues to a concert film of the Rolling Stones and an acclaimed study of Bob Dylan, No Direction Home, now sheds light on the self-confessed "dark horse" Harrison. Living in the Material World shows a man who – as well as being the stylish hippy of popular perception – had a caustic wit and a talent for deep friendship as well as an abiding obsession with his music.

Olivia Harrison, who produced the film with Scorsese and allowed unprecedented access to the family archive, talks candidly about her late husband's "challenging" attitude to other women and about the stranger who broke into the couple's home and nearly ended Harrison's life shortly after he had recovered from the first bout of the cancer that would eventually kill him.

She reveals that, although she and Harrison "seemed like partners from the very beginning" and shared a strong interest in meditation, their marriage survived a series of "hiccups". "He did like women and women did like him," she says. "If he just said a couple of words to you it would have a profound effect. So it was hard to deal with someone who was so well loved."

Paul McCartney also speaks about his old friend's appreciation of women: "I don't want to say much, because he was a pal, but he liked the things that men like. He was red-blooded."

Endurance was the key to the second, long-lasting Harrison marriage, according to his widow. "You go through challenges in your marriage and here is what I found: the first time we had a big hiccup in the road, we came through things, and then you go, 'Wow!' There is a reward at the end of it," said Olivia Harrison. "There is this incredible reward because you have lived through more and you have let go of something."

By the end, when her husband was ill, she was glad that they had "worked this through together. Through all these things that came between us."

She also reveals Harrison's fury at John Lennon's murder in 1980 at the hands of Mark Chapman. "He was angry John did not have a chance to leave his body in a better way," she says.

A few years later the Harrisons were to face danger themselves at the hands of a stranger. An attacker in what Olivia Harrison recalls as "a florid, psychotic state" smashed a window at their Friar Park home during the night and seriously injured them with a knife. "[George] thought that, after everything that had happened to him, 'I am going to be murdered in my own home.'"

Interviews with Phil Spector, who produced Harrison's first solo work, and with Sir George Martin reveal Harrison's central concern with music. Spector remembers an emotional intensity and an attention to detail. "Perfectionism is not the word. It went beyond that."

Harrison's widow says that his most important relationships were conducted through music and recounts that some of the lyrics to the song I'd Have You Anytime, written with Bob Dylan, were addressed to Dylan himself, whom Harrison felt had retreated from their friendship.

Clapton talks about the Camelot-like world of the Beatles and of feeling like he was an envious Lancelot. "I had become more and more obsessed with [George's] wife, Pattie," Clapton admits, describing how he confessed to his friend, "who was very cavalier" about it, almost giving him "carte blanche". Clapton adds: "To be honest there was a lot of swapping and fooling around."

Interviews with Eric Idle and Terry Gilliam confirm Harrison's crucial role in funding the Monty Python film Life of Brian by mortgaging his home. Harrison, through HandMade Films, went on to produce other leading British films such as The Long Good Friday, Mona Lisa and Withnail and I.

Ringo Starr is brought to tears on screen by the memory of his final conversation with Harrison who, dying in a Swiss hospital bed, still managed a bleak joke. Starr had to leave because his daughter was undergoing emergency brain surgery in Los Angeles.

"George said: 'Do you want me to come with you?' They were the last words I heard him say."

George Harrison: Living in the Material World is released on Blu-Ray and DVD on 10 October and will be broadcast by the BBC later in the year