I have a NPC who, when is about to be killed, uses Feign Death just before it is killed. As the point is to trick the players, do they gain XP for its death or not? And if so, the full amount or less?
Yes. Your players should gain the XP for the encounter.
From the "Beyond First Level" section of Players Basic:
As your character goes on adventures and overcomes challenges, he or she gains experience, represented by experience points. A character who reaches a specified experience point total advances in capability. (Players Basic p10)
XP is granted not for killing things, but for overcoming challenges. Thus, whether your PCs kill their opponents or not, they should get the XP for each encounter they beat, no matter how they beat it.
Something else that you may want to consider (and I've thought of it as I've pondered this question this afternoon), it's better for the story (as well as right by the rules) for you to grant XP for this encounter. That's because if you didn't and told your PCs that the villain wasn't dead, you rob him of the element of surprise when they show back up, which is a great time for your villain to then reveal the spell use himself.
The party gains XP for defeating their opponent. To do that they don't necessarily need to kill him/her/it. They also overcame the obstacle when the enemy surrendered, retreated, got knocked unconscious, was banished to another plane of existence, subdued and captured alive or, like in this case, faked their own death. What matters is that the player-characters overcame a challenge. Heck, you might even decide to give them the full exp reward when they overcame their enemy by talking them out of fighting in the first place through clever application of social skills.
Although you might decide to subtract some exp points when the enemy held back or ended the fight prematurely in a way which made the combat less challenging than it would have been otherwise. When your NPC was just toying with the party by not making use of their strongest abilities and then feigned their death while they still had most of their hit points, you might reduce the experience reward according to the lowered challenge. But when the NPC was fighting with full force and they didn't use Feign Death until they were already almost dead, then you should reward full exp for the combat.
It hinges on the word "defeat". Has the NPC been thwarted in his/her goals? Was s/he trying to block the PCs? If so, then I would probably give full xp. If not (eg, if the party were trying to kill the NPC for specific reasons of their own), then no: since the NPC used feign death to trick the party it could be argued that the party was defeated and no xp should be awarded.