Raul A. Reyes, an attorney and member of the USA Today board of contributors, writes frequently for CNN Opinion. Follow him on Twitter @RaulAReyes . The opinions expressed in this commentary are his.

(CNN) We're not with her. That's what Democratic voters in West Virginia said Tuesday night, with Hillary Clinton losing to Bernie Sanders . Although the loss was not unexpected, Clinton's campaign sure seems like one long slog of speeches, handshakes and voter selfies on the way toward the 2016 convention in Philadelphia.

This extended campaign, however, is actually the best thing that could have happened to Clinton. She has benefited enormously from the presence of Sanders. Now Team Clinton must build on lessons learned from the primaries as they prepare to run against Donald Trump in the general election.

Flashback to Clinton's campaign announcement, that vague video that featured a diverse cast of "everyday Americans." It was 2½ minutes long and basically said nothing.

Then look at Clinton these days, speaking out about income inequality, campaign finance reform, and the evils of the big banks on Wall Street. Hmm, where could those winning themes have come from? From Bernie, thank you, who proved that progressive voters are tired of not having a voice in national politics. His success pushed Clinton to the left, and she is a better candidate for it.

Despite Clinton's experience as first lady, senator, and secretary of state, there is an understandable tendency of many Democratic voters to be wary of anything resembling a Clinton "coronation."

As we saw from Clinton's failed strategy of inevitability in 2008 against Barack Obama, voters resent feeling they have to vote for someone.

So this primary season, the fact that Clinton has had embarrassing losses to Sanders (think Michigan ), and might even face more in the weeks ahead has a silver lining.

Like her or not, Clinton is mostly earning her nomination the hard way. The party elites and super PACs could not bestow it upon her outright. Wall Street contributions could not buy it for her.

Due to the unexpected resilience of Sanders' candidacy, Clinton has been forced to compete across the country, and to continually make her case about why she deserves our votes -- and that's a good thing.

While the Democratic primary race has at times seemed endless, with the same pair of candidates facing off i n debates and speaking in town halls week after week, this wearying process is itself part of the payoff for Clinton.

Had she wrapped up the nomination with a series of early, big wins, she would likely never have had a shot at bringing Sanders' passionate supporters into her camp. Instead, as things are playing out, this race gives Sanders supporters time to go through the "five stages of grief" -- denial, anger, bargaining, depression and acceptance -- before they face the reality that it's time to unite behind Clinton for the good of the party and the country.

CNN and other news outlets report that Sanders has little chance at winning the nomination. Under the rules for the Democratic primaries, delegates are awarded to candidates proportionally, so even if she loses states by a modest margin in coming weeks, Clinton can maintain her lead in pledged delegates.

Looking ahead, Clinton cannot shut Sanders out of the convention process. She already extended an olive branch to those who "Feel the Bern," in an April speech in which she listed all the issues on which she and Sanders agree.

JUST WATCHED CNN Projection: Sanders wins West Virginia primary Replay More Videos ... MUST WATCH CNN Projection: Sanders wins West Virginia primary 02:10

"Whether you support Sen. Sanders or support me, there's much more that unites us than divides us," Clinton said, after her big primary wins in the northeast. She needs to make this point strongly and repeatedly over the next few weeks -- and instruct her surrogates to treat Sanders supporters with respect.

The general election campaign between Trump and Clinton will be unpredictable, but for sure it will get ugly. Just this week, Trump attacked Clinton by bringing up the Monica Lewinsky scandal from 1998. Trump called Clinton an "unbelievably nasty, mean enabler" of her husband's alleged affairs, adding that, "what she did to a lot of those women is disgraceful." He called Bill Clinton "the biggest abuser of women, as a politician, in the history of our country."

Clinton's response was genius: "I have nothing to say about him and how he's running his campaign." This is the way to win in November, by taking the high road.

No matter what attacks Trump throws her way, Clinton should not follow him into the gutter ; look how that worked out for Marco Rubio, who has admitted to being embarrassed that he stooped to Trump's level. Fact is, voters are not going to make up their minds in November based on real or alleged scandals from nearly 20 years ago.

Besides, Trump himself is on thin moral ice when it comes to making accusations about infidelity. The thrice-married billionaire has been a staple of the New York tabloids for years -- and we know what they say about people who live in glass towers. Er, houses.

Clinton owes a debt of gratitude to Sanders for making her a stronger candidate. From here on out, she must stay focused on the issues, and let Trump do himself in with his childish and unpresidential antics. Slow and steady wins the race.