If this were to occur, I would probably be in such a terrible shock before I could register what had actually happened. First thing I would do would be to determine somehow if I was dreaming. Then I'd probably go in search of a friend to see if they were too trapped in the game. Then I would probably do my best to avoid everyone, but stealthily explore the maps and find a nice hiding place, if you will.
It depends on the circumstances surrounding the event. If I was trapped in the game, and I literally was my character, I'm not sure if I would know who I am. I'm not sure if I would have any recollection of the person who created me. My character might go on living the Feral life as if nothing had ever happened.