It’s hard to tell over the computer how deep an emotional affair may be. Because it can lead to something physical, be it with the other person, or to masturbation when one dwells on the emotional confusion it puts one in danger of sin. It can also cause one to disregard and alienate one’s spouse, which can also lead to difficulties and sinful behavior toward one’s spouse.
If there is temptation to sin, it is best to avoid it.
While these are general statements about the issue, anyone who has engaged in them, or is afraid that one is developing should seek the advise of a priest in the confessional.