RAW, your familiar must be incapacitated:
The creature must be incapacitated or dead.
Since your familiar can’t die, and you can’t reduce its hit points to 0, we’ve got to find another solution.
Fortunately, there is an easy one: your familiar still needs to sleep.
From the sleeping rules listed in Xanathar’s Guide to Everything, we see:
While a creature sleeps, it is subjected to the unconscious condition.
And from the Player’s Handbook,
An unconscious creature is incapacitated.
So wait until your little buddy is asleep, and proceed as described in the Dungeon Master’s Guide.
Alternatively, a generous DM could just rule that since you can communicate telepathically with your familiar and they are friendly to you, you can just do it. But there is a way to do it RAW with little trouble.1
1You should still discuss this with your DM. The question remains of what happens to harvested poison when your familiar disappears or changes form. A similar problem is addressed in this Q&A concerning harvesting materials from a wild shaped Druid. Differing answers on that question were well received, and it seems there is no RAW answer, so this is probably best left up to your DM.