Gender-switching in cyberspace indeed is psychologically similar to cross-dressing. There are a variety of reasons why a person may choose this activity - and not all of them are necessarily "bad" or an indication of an emotional problem. In some cases, gender-switching could be a productive endeavor. Of course, the effects on the relationship with one's spouse becomes another whole important dimension to the situation. Here's an article that might be helpful:
http://www1.rider.edu/~suler/psycyber/genderswap.html