Don't click on links in emails. It really is that simple. Don't click on links in emails and you won't end up accidentally providing your username and password to a site pretending to be legitimate.
Sometimes you have to click on links in certain emails, such as password reset emails. But get yourself out of the habit of clicking on links without any thought, and into the habit of defaulting into not clicking on links in emails and carefully considering the source of the email and examining the link destination when not clicking on links is unavoidable.