We need to be very careful with our analysis of this story and the links that we make between it and the author. The unwritten assumption in your question is that Poe was actually mentally ill, whereas we have no such proof. Some critics argue that because of the convincing descriptions of insane first person narrators, Poe himself must have suffered some sort of mental illness because of the understanding and insight he shows in creating such characters. This story is certainly one of these narratives, as the anonymous first person narrator is shown to be distinctly unreliable because of his insanity whilst at the same time he protests that he is actually well and not mentally ill. Note how this is achieved from the very first paragraph of the story:
True!--nervous--very, very dreadfully nervous I had been and am; but why will you say that I am mad? The disease had sharpened my senses--not destroyed--not dulled them. Above all was the sense of hearing acute. I heard all things in the heaven and in the earth. I heard many things in hell. How, then, am I mad? Hearken! and observe how healthily--how calmly I can tell you the whole story.
Note how the narrator juxtaposes the claim that he can hear "all things in heaven and earth" and "many things in hell" with the question "How, then, am I mad?" Such juxtaposition reinforces the insanity of the narrator. However, the fact that Poe is able to create such convincingly insane characters does not therefore indicate that he was insane himself.