Bryant Batt and Michael Urie

Mad Men star Bryan Batt sympathizes with the fans of Ugly Betty who are already mourning the loss of the show.

Exclusive: Mad Men's Bryan Batt to guest-star on Ugly Betty

"I had such a wonderful time working on the show," Batt tells TVGuide.com. "It's such a shame the show's been canceled because they've created this unique world and it's unlike any other thing that's out there. Like Mad Men, it became its own special creation and people really got into it."

Although the show is coming to an end, Batt has a very intriguing guest role in the final two episodes, the first of which airs Wednesday at 10/9c on ABC. "I play a soap opera actor who plays an evil doctor and an even more evil doctor twin," Batt says. "But there are some twists to his identity that are really kind of fun."

To say much more is to say too much, but Batt says producers told him the character would have continued to appear had the show been renewed. As it stands, Batt's character does offer some closure to one of the show's ongoing story lines. "He's not there by accident," Batt says coyly. "You get to find out everything. It's quite wonderful."

Michael Urie knows how he wants Ugly Betty to end

In the meantime, Batt's character is looking for lust when Amanda (Becki Newton) sets him up with Marc (Michael Urie). That relationship stalls before it even gets started. "We don't really go out," Batt says. "There's someone else he's interested in and rightfully so. I'm a couple of years his senior."

It may not be love at first sight, but Marc does get a somewhat happy ending: Batt's presence, as well as a bold move by Betty's nephew Justin (Mark Indelicato), inspires Mark to look at himself and his relationships in a new light.

Batt calls his brief time on the show a breath of fresh air, but says he's proud to be a part of Betty's swan song. "These are some of the best episodes," he says. "There are some plot twists that fans will just eat up, and it's a wonderful, wonderful ending."