It is not necessarily the case that Sméagol-Gollum has forgotten the word "hobbit"; he may never have known it.
Appendix F of The Lord of the Rings states, regarding the word hobbit:
Hobbit was the name usually applied by the Shire-folk to all their kind. Men called them Halflings and the Elves Periannath. The origin of the word hobbit was by most forgotten. It seems, however, to have been at first a name given to the Harfoots by the Fallohides and Stoors, and to be a worn-down form of a word preserved more fully in Rohan: holbytla 'hole-builder'.
(bold-type emphasis added)
Thus, it is at least theoretically possible that Sméagol had known the word—but only if it had been invented before or during his lifetime (he was on the order of 600 years old in the War of the Ring), and if he had had occasion to know of it. The word hobbit would only have cause to appear when Harfoots were present, or at least being mentioned. In a situation like that of Sméagol's, with apparently no Harfoots anywhere near (since they didn't care for that kind of land to settle in), it need not have been the case that the word ever came up. And if the word had been invented in a different place (by perhaps a different group of proto-Stoors), it would have been only a regionalism, and there would be no expectation that Sméagol would have learned it.
Presumably, since hobbit was a word originally used only of Harfoots, the Stoors and Fallohides would have had some other word to describe themselves, or some more general word that they used to describe all three varieties of halfling. Such a word Gollum might have known, and Bilbo might not.
Alternatively, it could have been that the word was invented later than Sméagol's time, or that (since the word was developed from something like the equivalent of holbytla) he learned the word before it began to be used in the worn-down "hobbit" form.
All this is simply to say that the fact that Gollum didn't recognize the word hobbit doesn't necessarily mean that he had forgotten it; and as you note the forgetting of his name isn't even mentioned in the book; thus the issue of a "selective memory" of some sort doesn't, in my understanding, arise.