When you use the conditional, you should use "were" , in both examples you gave, the "were" was used in conditional, I wish I were you .... but I'm not you in reality, so that's why were was used. also in the second example you used "if", which means that it's not a fact, so it's the conditional again.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.