Treat it as a game.
You are going to lose fights, you are going to lose instanced warfronts. Sometimes you will lose because 5 or more other players steamroller you. Sometimes you will lose because the one other guy you are fighting has a class or build that plays to your weaknesses. Sometimes you will lose because your teammates are not healing, or ignoring objectives, or just flat-out AFK and leeching. Sometimes your team will be doing everything right – and then the top PvP team on the server, who spend 20 hours a day playing, eating, sleeping and molesting goats together, will still beat you 500 – 0 because this is their life and you were just a bunch of ordinary Joes who tried their best.
None of this matters.
It’s Player Versus Player. By definition, one of those players is going to lose every time. What matters is how you deal with losing. If you whine and rage and blame everyone around you, you won’t enjoy it and you won’t get any better. sooner or later you’ll quit – hopefully sooner, because meanwhile you’re making it an unpleasant experience for everyone else around you.
If you can enjoy the challenge and the contest rather than being the type who only enjoys ‘winning’, then PvP is fun and enjoyable even when you lose. If you can observe, and learn, from your experiences, you will find you get better and win more often. You’ll still lose sometimes for all of the many reasons I listed above, but you’ll find you win more often as well.
The key is having the right mental attitude. All of the truly good PvP players I’ve met over the years have it. A lot of others don’t. All the rest is ‘fiddly bits’ like tactics and builds – not nearly as important.