I'm in the same boat as you, except I'm a caster. I just made a thread about it actually. In the Keybind menu it says Tab is supposed to cycle through nearest to farthest, but it definitely doesn't. I've had it target an enemy well out of range instead of an enemy within a few steps, directly in the middle of the screen. I don't know why they have such a hard time making a good targeting system in this game, its the first MMO I've seen that doesn't have it working properly.

As a melee DPS you have a few options though. F11 targets the closest enemy, but doesn't cycle. You could rebind it if you want. The easiest option though would probably be to use a controller/gamepad. I believe you can just walk up to your target and press X (or A on an xbox controller) and it selects what ever is in front of you.

If anyone has a way to fix the targeting without needing a button to cycle left, and a button to cycle right please PLEASE tell me.