I think the woman in the wallpaper is an image she is seeing of herself being trapped. People who are depressed are constantly stuck in their own minds. Sort of like being inside your own head and your eyes are just glass windows you can see out of, but cannot escape. She's seeing herself in the wallpaper trying to escape because she is also trying to escape her depression. When she is ripping off the wall paper and the woman is also ripping it from the inside, she thinks that the woman is helping her, but it's herself trying to escape.
In 1890, Gilman sent the story to writer William Dean Howells, who submitted it to Horace Scudder, editor of the prestigious magazine, “The Atlantic Monthly.” Scudder rejected the story as depressing material, and returned it to Gilman with a handwritten note that read: “Dear Madam: W. Howells has handed me this story. I could not forgive myself if I made others as miserable as I have made myself! Sincerely Yours, H. E. Scudder.” Eventually the story was published in “The New England Magazine” in May 1892. According to Gilman’s autobiography, she sent a copy of “The Yellow Wallpaper” to Weir Mitchell after its publication. Although she never received a response, she claimed that Weir Mitchell later changed his official treatment for nervous depression as a direct result of her story. Gilman also asserted that she knew of one particular woman who had been spared the “rest cure” as a treatment for her depression after her family read “The Yellow Wallpaper.”