This doesn't answer OP's question, but it addresses the confusion another answerer here has.
He said in his answer "best is a noun in I did the best I could, but an adjective in I did the best thing I could".
I strongly oppose that conclusion. In my opinion best is an adjective both in I did the best I could and in I did the best thing I could.
Here are the reasons -
- A noun can't be modified by an adverb (A noun phrase can, but we are talking about only noun not the noun phrase). An adjective, however, can be pre-modified by an adverb like very.
This time they cared enough to serve the very poor.
See in the sentence above poor, though, seems like a noun. But it's actually not. How poor? very. The adverb very pre-modifies an adjective. So poor is not a noun.
She is the most beautiful of them.
Here beautiful is not a noun. most beautiful is the superlative form of the adjective beautiful.
Similarly, in OP's quoted sentence best is an adjective.
ANSWER TO OP -
I did the best (that) I could (do).
The mention of do here is optional. Similarly optional is the mention of relativizer in the relative construction - (that) I could (do).
The antecedent here is the noun phrase (NP) - the best.
Now it's a different type of noun phrase where the head of the noun phrase is fused with its internal modifiers. Such NPs are called Fused-head NP.
I did [the best] [(that) I could (do) ___].