In theory, the Polyjuice Potion should work as per its design, allowing you to assume the guise of the person for one hour. In practicality, it will not work as you intend. When Bartemious Crouch Jr. assumed the guise of Alastor Moody in 1994-1995, he kept Moddy alive for two reasons. One, for the supply of hair for the potion; and two, to question Moody about his habits. If you take the guise of a dead person and run into someone who knew that person in life, you will be identified as an imposter very quickly, and not just because "you" are supposed to be dead.
Also, there may be an effect on the actual potion, depending on how long the person has been dead. Either way, it would be unwise to experiment with it.
I'm am not sure that it would work. Because once a person dies the hair dies as well, losing all nutrition. That is how forensic science can tell if hair sent for proof of life by kidnappers is real proof of life or proof of death. So if the person was just killed it might work, but not for sure. If the person has been dead for awhile the hair would do no good.