When Bing Crosby recorded 1942’s “White Christmas,” the entertainer was reportedly “in the dumps.”

Author Gary Giddins, who recently wrote the biography “Bing Crosby Swinging on a Star: The War Years 1940-1946,” told the new issue of Closer Weekly the singer was reportedly suffering from personal woes when he recorded the beloved holiday classic.

“He was in a period of tremendous despondency about his life,” Giddins told the magazine.

The biographer claimed Crosby felt trapped in his marriage to Dixie Lee, a rising film star who was the mother of his four sons. While Crosby conquered his own drinking after they married in 1930, Lee became an alcoholic.

Portrait of actor Bing Crosby (1903-1977) with his wife Dixie Lee (1911-1952) and their three young children, sitting on a picnic blanket outdoors, for Paramount Pictures, 1935. (John Kobal Foundation/Getty Images)

“It was a very unnerving home life,” said Giddins. “He was able to escape it through work, and she wasn’t.”

People Magazine previously reported that in 2014, PBS aired a documentary titled “Bing Crosby Rediscovered,” which shed light on his marriage to Lee. According to the publication, the actress drank herself “to oblivion” before succumbing to ovarian cancer in 1952 at age 40.

People added experts believed the couple’s twin sons, Dennis and Phillip, may have suffered from fetal alcohol syndrome due to their mother’s heavy drinking. It wasn’t clear whether Crosby ever suspected that Lee’s addiction may have impacted the twins.

Giddins shared Crosby also endured a grueling work schedule, which frequently kept him away from his family.

“He was traveling all over the country on tour, making three films a year, and doing a weekly one-hour radio show,” he explained. “When he would come home, Bing would try to make up for his absence by putting in all these rules and not too much discipline.”

Giddins added Crosby reportedly felt insecure about his own work as a star.

“[He] expressed some doubts about his singing, which was certainly the most important thing in his life,” said Giddins. “He tried to keep that a secret, but I was able to document it.”

Still, Giddins insisted Crosby felt a sense of purpose entertaining American’s servicemen during World War II.

“[It] gave him a mission and a reason to value his talent because he was never more needed or in demand than he was during the war,” said Giddins. “It grabbed him out of that borderline self-pity he was feeling.”

Crosby’s “White Christmas,” a tune from the 1942 film “Holiday Inn,” resonated with American troops away from their families.

RogerEbert.com, the official website of the late film critic, previously noted Crosby originally introduced the Irving Berlin-penned song on a Christmas radio broadcast in 1941. He would later re-record it in 1947. Another variation was recorded for the 1954 film “White Christmas.”

“Holiday Inn,” which also starred Fred Astaire and Marjorie Reynolds, tells the tale of a inn that is only open on holidays.

“It became a theme that measured how lonely and distant the men who were fighting the war felt they were from home,” said Giddins about the beloved tune. “Will we see a white Christmas this year? When will we be home?”

And Crosby never forgot his fans overseas. In fact, he was determined to put on a show just for them, even if it meant risking his own life.

“On his 1944 trip to London and France, he was performing for weeks within bombing distance of the front lines,” said Giddins. “He was in awe of the troops, and he felt it was an obligation to do whatever he could for them. Bing refused to take credit or to be honored for it.”

American actor and singer Bing Crosby poses for a portrait holding a pipe in his hand in 1948. (Gene Lester/Getty Images)

Crosby received thousands of letters from “relatives of servicemen who have been killed,” thanking the star for giving the troops a sense of joy and hope during times of anguish.

“Bing was second to nobody in his generosity during the war,” said Giddins.

RogertEbert.com previously reported that no one originally thought “White Christmas” would become such an iconic hit. However, the song became a sensation during World War II.

“Irving Berlin wrote it as a war song,” said Giddins. “It is probably the first war song that didn’t mention the war. It became an anthem.”

RogerEbert.com also revealed that according to Guinness World Records, “White Christmas” has sold more than 100 million copies worldwide, with an estimated 50 million as singles.

Crosby remarried in 1957 to actress/singer Kathryn Crosby. That union lasted until his death.

The New York Times reported Crosby passed away in 1977 at age 73 from a heart attack. At the time of his death, the newspaper noted that for almost five decades, he “delighted millions on radio, television, and in motion pictures and near World War II battlefields, where he entertained countless servicemen.”