From Tolkien Gateway

For Sméagol, the creature also known as Gollum, the loss of the Ring and his tortures in the land of Mordor had destroyed his mind. By the time he met Frodo and Sam beneath the Emyn Muil, his personality had split into two, with one side seeking companionship and favour, and the other side desperately wanting to recover the Ring at any cost, including the murder of his companions. Sam secretly gave names to these two sides of Sméagol: the pathetic, simpering side he called 'Slinker', but the jealous, dangerous side he gave an even worse name: Stinker. As Gollum's darker side took him over completely, so Sam started to use the name 'Stinker' as just another name for the scheming creature.[1]