I don't know about the clicking noise.
However, a bad injector can certainly cause a sh*tty idle and hesitation.
I know this for a fact, had to replace an injector a couple months back.
If it is an injector, buy them used on the Classifieds. New ones are outrageously expensive. You can get four (4) on a fuel rail for about $40 bucks all day long pre-owned. Folks going turbo upgrade them all the time, leaving the stock ones for folks like me with a standard DE motor.