"Fuck yourself" is the imperative, although the usual wording is "go fuck yourself". The lack of reflexive pronoun in "fuck you" indicates to me that it is not truly an imperative.
But it also doesn't really make sense for the expression to have an elided "I". Think about it: kids say "fuck you" to their parents, (straight) men say it to other men, one person may say it to a group of people, etc. It just doesn't make sense for it to mean "I fuck you". ("Fuck you" is sometimes interpreted this way in sarcastic retorts, but only because it is clearly against the intent of the "fuck you".)
The Oxford English Dictionary says that "fuck" in oaths is used "chiefly in optative with no subject expressed". (It also says this of the corresponding usages of "bugger" and "damn".) The book Evolutionary Syntax elaborates:
It is also relevant in this respect that swearing in present-day languages often involves verb forms which look like imperatives, but are not true imperatives in the modern sense of the word. These include e.g. Damn (you)! Fuck (you)!), as discussed in Dong (1971). Such uses of verbs in swearing in fact resemble optatives in the sense that they impose wishes/curses upon someone. In that sense, such swear expressions can be seen as negative versions of optative phrases such as Long Live the King! [...]
Some sources say that it is some type of subjunctive. For example, the article Fucking the Subjunctive says:
Noting that fuck you and bless you are structured similarly and used in practically identical grammatical contexts --- if opposite social contexts --- it seems reasonable to conclude that the blasphemous one is another example of the jussive subjunctive mood.
"No! God doesn't fuck people!" you may say.
That's true. With the exception of Mary, God stays out of mortal business. Knowing, however, that the rest of those musty word buddies --- bethatasitmay, and all those other set phrases that might as well be one word, given how we use them --- originate from an older period of English in which the subjunctive was commonplace, think about the superstitions people back then had. About fucking. And supernatural entities.
That's right. The Devil fucks you.
It seems plausible to me that far from being a command or a request, fuck you is actually a invocation of the Devil or his underlings to fly into you bedroom and ravage your privates in your sleep. Literally, fuck you could be May the Devil savage you in your sleep. And that, I have to admit, is probably the worst curse I could ever think to hurl at somebody.
Some say both, such as Swearing: A Cross-Cultural Linguistic Study:
In modern English, curses usually dispense with the subject and consist of more compressed constructions like Damn you!, Fuck you!, Sod the consequences!, where Damn, Fuck and Sod are examples of optative subjunctives of the same kind as live in Long live the Queen!