In my opinion, using expected value to evaluate lotteries is not correct. Realistically, there are only two outcomes. Either you win millions, or you lose a few thousand over several years. The future where your outcome matches the expected value never actually occurs.
This is unlike games like blackjack, poker, or roulette, where the expected value does match the eventual outcome.
So if you can live with the second outcome, playing the lottery is fine. But using expected value does not seem appropriate to me.