Jesus says plainly he is a man - does John 8:40 preclude him from also being God?
Answer: No. Jesus was physically a man and spiritually God.
This same question might be asked slightly differently: "How could Christ be a Son of God at all?" Is He not an eternal Being? To answer this, we need to differentiate between Christ's physical Being, His earthly body as Jesus (through Mary) and His eternal nature as God: His Spirit (through the Holy Spirit). Suppose we focus on the beginning of John's Gospel:
John 1:1-3: “In the beginning was the Word, and the Word was with God, and the Word was God. He was in the beginning with God. All things came into being through Him, and apart from Him nothing came into being that has come into being” (emphasis added).
There does not seem to be any ambiguity regarding Christ’s eternal identity here. He is "The Word." We see this same characterization of Christ in the Book of Revelation:
Revelation 19:13: “He is clothed with a robe dipped in blood, and His name is called The Word of God” (emphasis added).
Again, we see "The Word" representing the second Person of the Godhead. It seems that, eternally, the Figure we call Jesus, the Son of God, or Christ is “The Word.” We might slightly paraphrase Revelation 19(:13) as follows: “He is clothed with a robe dipped in blood, and He is The Word.”
Another question that is just as profound is the idea of one Member of the Godhead "becoming" or being "begotten." How can God ever be either of these things? Well, assuming that words have meaning — and God is not a god of confusion (1 Cor. 14:33), there appears to be only one way out of this conundrum. That is, three Beings exist, all of the same (spiritual) nature: The Father, The Word, and The Spirit.
This may be the contentious part of my response: The only way to view Christ as the "Son of God" is historically. How can we know this? Well, we are told several times that "The Word" became flesh, that is, the self-existing Word became a human being:
John 1:14: "And the Word became flesh, and dwelt among us, and we saw His glory, glory as of the only begotten from the Father, full of grace and truth" (emphasis added).
Note the terminology: "The Word became flesh" and "[The Word] dwelt among us." If this is insufficient, the Letter to the Hebrews seems to clearly indicate that there was a specific day when Christ, the human being, was begotten:
Hebrews 1:5: “Today I have begotten You.”
To which day do you suppose God (the Father) is referring? Naturally, we must be talking about Christ’s physical birth as the baby Jesus in Bethlehem. The incarnate God-Man, Christ Jesus, was made in God’s image, but He was far more than that. This is why “we saw His glory, glory as of the only begotten” (Jn. 1:14).
Suppose we now contemplate several passages in Scripture that speak more fully to this matter:
1. John 1:18: “No one has seen God at any time; the only begotten God [Christ] who is in the bosom of the Father, He has explained Him” (emphasis added).
It seems that even as an incarnate man of flesh and blood, Christ’s cognitive Being still uniquely identified with the Father. That is because He was still God just as John 1:18 tells us. Christ was always God, eternally “The Word” and temporally as the historical Figure, Jesus Christ.
2. When God became incarnate, He would do so as a son of the Father. The Book of Isaiah reads:
Isaiah 9:6: “For a child will be born to us, a son will be given to us; And the government will rest on His shoulders; And His name will be called Wonderful Counselor, Mighty God, Eternal Father, Prince of Peace.”
First, a child (Jesus, the Christ) would be born (i.e. incarnation of the Word). Further, the text suggests that the fullness of the Godhead, that is the Trinity, dwelled in Christ. [Note: The "child" is identified by four specific terms, all of them characteristic of a member of the Godhead: Father, Word, or Spirit: "Wonderful Counselor" (Spirit?), "Mighty God" (Father/Christ), "Eternal Father" (Father), "Prince of Peace" (Christ).]
3. The truth of these identities in Christ appears to be revealed elsewhere as we observe the Letter to the Colossians:
Colossians 2:9: “For in Him all the fullness of Deity dwells in bodily form” (emphasis added).
The only way the "fullness of Deity" could dwell in Christ, was if He maintained a flawless relationship to the Father while on earth:
John 3:13: "No one has ascended to heaven but He who came down from heaven, that is, the Son of Man who is in heaven" (NKJV, emphasis added).
These words may explain more than we first realized.
4. One of the intents of this response is to reconcile the term "only begotten Son" with a Being Who is not begotten. In the realm of the eternal, this is The Word. Christ was physically a son of God, just as Adam was a son of God (Lk. 3:38). His divinity was that of the Father (God). Deity is never “begotten”: as Christ, the eternal God walked the earth while maintaining His intimate relationship with Heaven.
Now, let us observe the passage from the OP:
John 8:40: "But as it is, you are seeking to kill Me, a man who has told you the truth, which I heard from God; this Abraham did not do" (emphasis added).
Indeed, Christ was physically a man. However, let us now contrast this with the Gospel of John only a few verses later:
John 8:56-58: "Your father Abraham rejoiced to see My day, and he saw it and was glad.” 57So the Jews said to Him, 'You are not yet fifty years old, and have You seen Abraham?' 58Jesus said to them, 'Truly, truly, I say to you, before Abraham was born, I am.'"
The statement "I AM" (Jn. 8:58) is an unequivocal declaration of the deity of Christ as God (cf. Ex. 3:6, 14-15, etc.). It is the reason the Jews sought to stone Him: He identified Himself as an integral part of the eternal Godhead.