Teladoc Health (TDOC 3.31%) shares crashed last week after the telemedecine company reported a large loss and incurred impairment charges totaling billions of dollars for the second straight quarter. And over the longer term, its growth rate has also been slowing down.

Growth investors have become frustrated with the stock amid the sell-off in the markets this year. Teladoc has crashed 60% while the S&P 500 is down just 13%.

Although it's easy to be bearish on the stock, selling shares of Teladoc right now could be a huge mistake, especially based on an earnings miss. Here's why the past quarter wasn't an outright disaster and why Teladoc's stock could rally in the future.

The company is still growing at a challenging time

For the three-month period ended June 30, Teladoc's sales totaled $592.4 million and rose 18% year over year. While that's a slower growth rate than in previous quarters, the company's top line is still moving in the right direction.

This chart shows that its quarter-over-quarter (QoQ) growth rate has also been fairly steady of late. It demonstrates that even amid inflation and other macroeconomic issues, the business has continued to increase its sales, which is no small feat these days.

TDOC Revenue (Quarterly) Chart

TDOC Revenue (Quarterly) data by YCharts

Paid memberships also totaled 56.6 million as of the end of the period and were up 9% year over year. That's an improvement from the previous period, where Teladoc reported 54.3 million paid memberships, which rose at a rate of only 5%.

Teladoc's future remains promising

Teladoc has been achieving these results even though management admits it has been difficult to get employers to sign on. Many are hesitant to make big purchases in the current economic environment, with many delaying their decisions as a result of the uncertainty ahead.

However, the company remains bullish on its future, with CEO Jason Gorevic stating on last month's earnings call that Teladoc has "twice as many multimillion-dollar deals in the pipeline as we did, as we entered the third quarter last year." What's holding those deals back is that the companies are being extra careful in what expenses they approve.

In a sense, this is not unlike what investors are seeing in the tech world, where ad spending has been down as businesses are being more mindful of their budgets. Teladoc is facing temporary headwinds that, once they subside, could lead to stronger growth numbers.

Operating cash flow reached a record high

Despite reporting a net loss of $3.1 billion during the period (primarily due to impairment charges), the healthcare company's operating cash flow improved to more than $92 million.

TDOC Cash from Operations (Quarterly) Chart

TDOC Cash from Operations (Quarterly) data by YCharts

Impairment charges don't impact cash, and while investors shouldn't ignore them, I'd argue that good cash flow is more important as it can help management avoid new stock or debt issuance -- both of which hurt shareholders -- just to keep the business growing.

Teladoc's margins are also stronger

Another positive takeaway from the recent earnings numbers include Teladoc's gross margins, which also are the highest they've been in years.

TDOC Gross Profit Margin (Quarterly) Chart

TDOC Gross Profit Margin (Quarterly) data by YCharts

Keeping gross margins high, up around 70%, should put Teladoc in an excellent position to cover its operating expenses as it grows and expands its business. Without the goodwill impairment charge this quarter, Teladoc's net loss would have totaled $71.5 million, nearly half the size of the $133.8 million loss it reported in the prior-year period.

While it was disappointing to see Teladoc incur another impairment charge this past quarter, there are many other positives, including its strong gross margin, to take away from the results.

Teladoc remains a solid long-term buy

Selling a quality stock like Teladoc during a downturn in the markets could prove to be a costly mistake. The company is showing signs of progress, and some investors may have trouble looking past its net losses, which have understandably looked awful.

But at this stage, there are more positives than negatives here. Investors may even want to consider averaging down their investment, potentially setting themselves up for greater gains down the road.