Click to email this to a friend (Opens in new window)

Click to share on Twitter (Opens in new window)

Click to share on Facebook (Opens in new window)

Alec Baldwin has had his final meltdown at MSNBC.

The rage-aholic’s weekly show, “Up Late With Alec Baldwin,” was canceled Tuesday because of the actor’s foul-mouthed, homophobic rant at a New York Post photographer.

Baldwin’s spokesman Matthew Hiltzik and a rep for the cable channel said, “We are jointly confirming that ‘Up Late’ will not continue on MSNBC.” The MSNBC spokeswoman added, “This is a mutual parting and we wish Alec all the best.”

Baldwin was suspended — supposedly for two weeks — after he screamed at a Post photographer, calling him a “c—s—ing faggot.” The “30 Rock” star was supposed to resume his weekly show Friday.

But his latest rant, which drew fire from gay-rights organizations, gave the NBC Universal bosses a great excuse to cancel a show that wasn’t working anyway, after just four episodes.

As Page Six scooped a week ago, Baldwin’s ratings were weak. After a decent debut that featured an interview with about-to-be-elected Bill de Blasio, his last show with Debra Winger pulled in just 395,000 total viewers.

Besides demanding a humidifier because he claimed the air at 30 Rock was too dry, Baldwin alienated colleagues when he demanded a separate makeup room that was being used by a woman with cancer who is sensitive to hairspray.

When Baldwin was told he couldn’t have his way, he allegedly bellowed at the top of his lungs, “I don’t give a f - - k if she has cancer or not, I want that f - - king makeup room.”

A network source told Page Six’s Emily Smith, “The frustration set in several weeks ago. All Baldwin’s shows were unwatchable. He assumed it would be a success, and when he saw the ratings were a disaster, he stopped wanting to do a lot of work for a little audience.

“Baldwin found out that cable news is tough, and stopped making an effort,” said the source.

Baldwin, who is in Hawaii filming a Cameron Crowe movie, told the Web site Gothamist: “There’s nothing you can do when you get thrown in this washing machine, nothing.”

Baldwin blamed “the fundamentalist wing of gay advocacy” for the show’s cancellation. “They killed my show. And I have to take some responsibility for that myself.”

Regarding The Post story, Baldwin said, “ I didn’t ask for a humidifier, I asked for humidification. So we had a day where . . . my voice would crack, it was heavily air conditioned, I found it tough to talk. I did not demand someone put a humidifier in.

“And the woman using that dressing room, I was told she’s allergic to some chemical, no one ever ever ever said to me that somebody had cancer, and I never said ‘I don’t give a f–k.’ ”