The first evil is able to take the form of dead people. Still, we see several time how it takes the form of Buffy (to Caleb and Buffy herself). How is this possible?
We know from the activation of Kendra (and later Faith) as Slayer after Buffy's first death at the end of Season 1 that the metaphysics of the Buffy universe doesn't really cope with people returning from the dead. (The prophecy states "Into every generation a slayer is born: one girl in all the world, a chosen one" but because of Buffy's death there are for the first time two active Slayers when there is only supposed to be one.) Because Buffy has been dead, the universe classifies her as part of the class "people who have died" and for this reason, the First is able to take her form.
Well, to be honest,
by that point Buffy had died twice already. Once at the hands of The Master in season 1, and once at the end of season 5, sacrificing herself for Dawn.
When Willow brought Buffy back from the dead, she "came back wrong". She is alive, but dead. This was explained when Spike realized he could hurt her, regardless of the chip in his head - because she is still technically dead. This error in her composite is the same reason The First can appear as her.
When Buffy first encounters the First Evil it takes the form of Jenny Calendar. When it appears to Angel it take the form of people that he had killed during his time as Angelus. Buffy had already died once at this point, so it's interesting that the First doesn't attempt to use Buffy's form to manipulate Angel. Perhaps in order for the First to take on someone's form they actually have to cross over into their eternity as Buffy did at the end of season five. Her death in Prophecy Girl was only for a moment before Xander performed CPR and revived her. Willow in season 7 notes that everything is connected. You could imagine the metaphysics of Death and a soul leaving it's body allowing the First to access a person's memory in a state where the soul is separate from the body.
The First Evil is capable of appearing as anyone who is currently dead and those who have been resurrected from death(such as Buffy) and also vampires that are either "alive" or truly "dead"