She only crossed the line after she thought Regina had killed Archie and after she had been flung back by magic. The whole episode she spent trying to give Regina a chance. She invited her to the party. She apologized for her comment, and commented highly on Regina trying. When everyone else was willing to believe Regina had killed Archie, Emma stood up for her. She said herself that everyone deserves a chance. That she would not have ended up very well if she had not been given the chance. She was giving Regina her chance.
It was Cora in the end. She was able to come up with a good way of framing Regina for the crime. Emma was just doing what she had to–to find justice for Archie’s death and keep the town safe.