BELOVED ICON: Valerie Harper, as Rhoda (above) in the 1970s, revealed to People that she has terminal brain cancer. (CBS /Landov)

Valerie Harper, the actress famous for her role as spunky best friend Rhoda Morgenstern on “The Mary Tyler Moore Show,” is suffering from terminal brain cancer and may have just three months to live, she’s revealed in a heartbreaking interview.

The Emmy Award-winning actress, who won over America with her wisecracks and flamboyant head scarfs, said doctors diagnosed her with the fatal disease Jan. 15 after her face went numb during a rehearsal.

“We spend our lifetime thinking, ‘I’m never going to die. But then cancer says, ‘Hey, not so fast.’ ”

The condition, in which cancer cells overtake the brain fluid, is incurable and at its late stages.

The Rockland County native — who later starred in her own spin-off, “Rhoda” — said she’ll undergo chemotherapy but is resigned to the possibility of death.

“I have a fighting chance until I’m gone, [but] I’m well passed my expiration date already,” she said. The cancer has been growing for more than eight months.

Her fans, friends, and a star-studded list of former colleagues said they were heartbroken.

“I’m absolutely devastated by this news,” said Mary Tyler Moore, 76, who played Harper’s best friend on the show and is also a pal in real life.

“Valerie has given so much joy, laughter and love to the world — I join her fans and send much love and positive thoughts to her and her family during this difficult time.”

Harper didn’t tell Moore about the diagnosis before the article came out.

“She is darling,” Harper said about Moore. “We talk on the phone about her dogs and laugh all the time.”

Other co-stars called the diagnosis simply unfair.

Betty White, who played perky Sue Ann Nivens on the landmark 1970s sitcom, called the news painful.

“Here I go wheezing on at 91 years old, and this beautiful, beautiful lady is facing something far too soon,” White told The Post. “We all love her so much, and we are going to make the most of every second we can.”

Actor Ed Asner, who played producer Lou Grant on the show, was more upbeat.

“I have every confidence in the world that she will shock the hell out of us and survive — to keep functioning as the great talent and human that she is,” he told The Post.

Harper grew up Catholic in Suffern, attended high school in Jersey City then later studied ballet in Manhattan in the late 1950s.

In 1970, an agent spotted her and helped her land the role of Rhoda. Harper and Moore created one of TV’s most beloved female friendships.

She scored eight Emmy nominations and won four times — three as a supporting actress and once for her own show “Rhoda.”

She later earned praise for her role as the suburban mom Valerie Hogan on the 1980s television show, “The Hogans.”

In 2008, she hit the road for her one-woman show “Looped” and won a fight with lung cancer — which struck despite the fact that she didn’t smoke.

The battle inspired her memoir “I, Rhoda,” which hit the stands earlier this year.

She first noticed a tingling in her gut in August while preparing for “Looped.”

And in December, a seizure hit while she was driving in Santa Monica.

“My windshield was obliterated with vomit — and I hadn’t felt sick, ” she said. “Later, I found out it was the benchmark for a seizure”

She visited several doctors, but tests were inconclusive — until mid-January, when the right side of her jaw began to feel “like it had Novocaine in it.”

She at first thought it was a stroke, but after a series of tests discovered the disease would likely be fatal — heartbreaking news for her longtime husband Tony Cacciotti, who spent nights with her at the hospital.

“It’s like a cleaver in your heart,” Cacciotti told People. “I held it in, but I broke down later.”

Still, Harper has managed to find humor in her final days.

Although her character Rhoda was always dieting on screen, Harper says her doctors are now saying she needs to gain weight.

“Men have never said that to me!” she quipped.

“I’ve been worried about getting stuff done before it starts affecting my thinking and clarity” — and last week called a crematory to make arrangements.

“If I booked it by Thursday, I could save $150. I was thrilled!” she said. She’ll spend her remaining time in her garden, saying, “I have plants I always wanted to pull the leaves off of.

“I don’t think of dying. I think of being here now.”

But she has been hit with waves of depression. On some nights, she even wakes up crying.

She decided to go public with the news to raise awareness about the disease.

“All my life, people have had a connection to me because of Rhoda. Now there are things I want to share,” she said, adding her ashes will be scattered in the Pacific.

Ultimately, Harper, who was photographed smiling and calm in the mag, said she doesn’t fear death.

“I see death as a passage. I don’t have a lot of certainty about reincarnation, but I have a lot of interest in what lies ahead,” she said.