As of this time there is no quick convenient way to perform this function. The only two ways I know of to unselect a target is using ‘esc’ key or left-cilcking on an empty spot, neither of which are ideal.
Using ‘esc’ is undesirable for two reasons: it’s out of the way at the corner of a normal keyboard and pressing it more than once will bring up the menu — which is unacceptable in the mist of battle.
Unselecting with the LMB isn’t ideal because it forces the player to find an empty spot in the environment to click on to deselect. This gets more difficult if there’s a lot of spells and particle effects going off. Additionally, depending on the physical mouse this isn’t as easy as pressing a simple keystroke.
Prior to the latest patch 10/7 (build 15,674) the stated limitation can be workaround by binding ‘target nearest ally’ to a key. If no target ally is nearby it would untarget your currently target. This is no longer the case with the latest patch.