Just reset your phone from the settings menu and remove your mi account. It will restart as a new phone but as said above, with whatever version ROM you have installed. If you don't remove your account, the buyer may have issues using it with their account. I'm not sure if just a reset, whether your account is removed. Maybe someone could confirm?