There is a game option setting for Auto-Assist. You can disble this if you don't want to automatically target your enemy's target (i.e., automatically heal your enemy's target, if that target is an ally).
To target yourself explicitly, either hit F1 (a keybind to target yourself, which you can change in Key Binds menu), or right-click on your ship indicator window (the one with shield strength, crew, etc.).
Yes, the auto help thing is kind of...crappy at first. You always buff/heal your targets target. It works out if that person is you but otherwise you help you the other in the instance. Easiest way, click yourself and then heal.
Now once you remember the auto help it's actually really nice. Most times I need to help who ever the target of my target is and it saves me a click.