If I saw a research result similar to mine from my PC/editing duties, should and how should I contact the authors?
If you have already read the paper, do not contact the authors. Here's why: 


You would have to admit to them you read the paper. Since that is a conflict of interest (and you should have recused yourself), you would essentially be outing yourself and the journal for less than ethical reviewing.
You would be providing an incomplete opinion on their results. Your paper hasn't been published yet, so you don't know for a fact that your results/contribution are considered more valuable than theirs. Telling them of your research may sway them to continue or abandon their work unfairly. 


Going forward, make sure to recuse yourself from editing before you read the paper. When the editor/assigner emails you about the assignment, make sure to read the abstract thoroughly. If one is not provided, email back and ask for one. If the abstract suggests a line of research that appears close to yours, recuse yourself at that point -- before reading the full submission. If you have any doubts about how close it is, I would recuse myself anyway. Most editors appreciate this.