For five years, McCarthy, 37, and Carrey, 48, had one of the industry's most fun-loving relationships -- on Valentine's Day, Carrey hired a plane to write "J Hearts J" across the Los Angeles skyline.
He followed that up with a sweet, if a tad sick, post on Twitter: "Jenny my Love, you've stolen my heart, my soul and of course anything you find in my pants."
But the news the two broke on Twitter late Tuesday was more bittersweet than buoyant:
"I'm so grateful for the years Jim and I had together," McCarthy wrote. "I will stay committed to Jane [Carrey's 22-year-old daughter] and will always keep Jim as a leading man in my heart."
"Jenny and I have just ended our 5yr relationship," Carrey tweeted. "I'm grateful 4 the many blessings we've shared and I wish her the very best!"
Representatives for Carrey and McCarthy did not respond to requests for comment on details surrounding the breakup.
While the former Playboy Playmate and the "Yes Man" star maintained a sunny relationship in public, behind the scenes, it may have had a dark side.
"Jim has suffered from depression, and that might have taken a toll on the relationship," People magazine senior editor David Caplan said.
In 2004, Carrey spoke out about his battle with depression to "60 Minutes."
"There are peaks, there are valleys. But they're all kind of carved and smoothed out, and it feels like a low level of despair you live in," Carrey explained. "I was on Prozac for a long time. It may have helped me out of a jam for a little bit, but people stay on it forever. I had to get off at a certain point because I realized that, you know, everything's just OK."
Depression wasn't the only condition that affected the couple. McCarthy has long been vocal about her 7-year-old son Evan's battle with autism.
These days, she's known more for her activism -- she heads up the autism advocacy group Generation Rescue -- than for her previous roles in Hollywood.