A quantum-like Landau damping of an electromagnetic wavepacket