Mercedes (Amber Riley) and Rachel (Lea Michele) sing their way out of high school in tonight’s “Glee” season finale. (Mike Yarish/Fox)

Tonight, the third season finale of “Glee” will air, shutting the door on the New Directions as we’ve known them since season one and ushering in a new era of “Glee.” That new era, apparently, will see the choral dramedy morph into a show within a show, one partially set in New York so we can still find out what Kurt, Rachel and Finn are up to and one still focused on the events at Lima, Ohio’s McKinley High, where, presumably, we will still be able to follow the nonsensical story arcs that involve Sue Sylvester.

At this significant moment in “Glee”-dom, as many of our Gleeks don graduation gowns, it seems appropriate to assess how we feel about the series that, three years ago, commanded us to not stop believin’. But do we still believe?

Related: Read the season finale recap: Pomp, circumstance, sobbing, singing.

Let’s be honest. Even during “Glee’s” first season, the show was undeniably cheesy and often a bit wobbly in its execution. (Terri’s fake pregnancy, for example, was an act of fake belly bump absurdity that dragged on for far too long.) But it dealt with tolerance and bigotry in a way that, while occasionally preachy, was refreshing. And more importantly, it also frequently delivered moments of pure, unashamedly hopeful joy. The name “Glee” was apt, and not just because of the club on which it was based.

During season two, what was once the little singing-and-dancing-show-that-could turned into a Fox juggernaut responsible for attracting high-profile guest stars, cranking out tie-in CD compilation after tie-in CD compilation and spawning concert tours as well as 3D movies based on those concert tours. It got a little too big for its theatrical britches.

When season three commenced, executive producers Ryan Murphy and Brad Falchuk seemed committed to getting the show back to its roots. But things have still felt uneven. The Sue Sylvester run for Congress never paid off comedically, and the whole situation between Puck and Shelby never paid off narratively. The incorporation of contenders from the “The Glee Project” has only exacerbated the show’s inability to keep a solid handle on its ever-increasing characters. (What did Rory (Damien McGinty), for example, get to add to the show, other than an Irish accent, a nice Teddy Thompson cover and a false story about potentially being deported?)

And the usual examples of “Glee”-diculousness still abounded. Rachel and Finn improbably decided to get married and are still, even more improbably, sticking with that decision. As Will Schuester, Matthew Morrison was forced to make serious statements like, “In all my years as a teacher and a student, I have never known a slushie to do that kind of damage.” For reasons that still defy the boundaries of basic logic, a paralyzed Quinn regained the capacity to walk as well as perform choreographed musical number again?!? in a matter of mere episodes.

But season three still gave us some flashes of that plucky, showtune-belting optimism that made us love “Glee” in the first place. Most of those flashes came in the form of its musical numbers. The “Mash-Off” episode, with its exceptional medleys of Adele songs and collisions between Eddie Rabbit and Lady Gaga, was packed with terrific numbers. “The First Time” treated teen sexuality with frankness as well as sensitivity, all of which culminated with a beautifully executed rendition of “One Hand, One Heart” from “West Side Story.” Rachel’s NYADA choke was a genuine heartbreaker, one that made her return to form via a Celine Dion song that much more terrific. And thanks to a tragic coincidence of timing, Amber Riley’s performance of Whitney Houston’s “I Will Always Love You” emerged as the most moving televised tribute to the late singer to air in the days immediately following her death.

Why did that Mercedes moment work so well? Because Riley’s a great singer, for starters. But also because it happened upon its poignancy by accident. Unlike all those ultra high-profile guest appearances and tributes to artists like Michael Jackson, the best bits on “Glee” — and, often, in the theater in general — cannot be planned. They just happen.

In a show as complicated to orchestrate as “Glee” is, it’s practically impossible to count on happenstance and chance successes­­. But the fact that “Glee” occasionally still manages to find some is enough to keep me watching, or at least to keep paying close atention to its musical numbers.

Even with its many flaws, we need a show like “Glee.” In this age of digital snarkery, where cynicism zips along DSL lines faster than Sue Sylvester can bust out a sarcastic retort, it reminds us that there’s still something to be said for having a song in one’s heart.