The word "whose" is used in several different grammatical ways. For some of these (see my original answer below), it has been grammatical to use it for inanimate objects, at least since the days of Shakespeare. For others (see my update), it is only used for people or animals.
ORIGINAL ANSWER:
Many people seem to believe that you cannot use whose for inanimate objects, but I don't believe this was ever proscribed except by out-of-control grammarians. Consider the following quotes from Shakespeare (selected from many more quotes where whose refers to an inanimate object) and more recent authors:
Hamlet I.v
I could a tale unfold whose lightest
word
Would harrow up thy soul, freeze
thy young blood,
Two Gentlemen of Verona, III.ii
By wailful sonnets, whose composed rhymes
Should be full-fraught with serviceable vows.
Timon of Athens IV.iii
The sea's a thief, whose liquid surge resolves
The moon into salt tears:
Jane Austen also used whose to refer to inanimate objects:
Pride and Prejudice (1813)
On reaching the house, they were shown through the hall into the saloon, whose northern aspect rendered it delightful for summer.
Also F. Scott Fitzgerald:
The Great Gatsby (1925)
I walked out the back way ... and ran for a huge black knotted tree whose massed leaves made a fabric against the rain.
Not to mention Pat Conroy:
South of Broad (2010)
... as I walk down Church Street, whose palmetto trees are rattling and whose oaks shake with the ancient grief of storm.
UPDATE: I just realized that whose is used in several different grammatical ways. In some of these ways, I would never use whose for anything but a person or animal. In particular, one of whose's uses is as an interrogative pronoun, as in:
Whose shoes are these?
Whose are these shoes?
If you had some leaves, and were asking which tree they fell off of, you cannot say:
*Whose leaves are these?
*Whose are these leaves?
You have to say something like
Which tree's leaves are these?
But when it is a relative pronoun that immediately follows its antecedant, whose can be used for inanimate objects:
The tree whose leaves look like hands ....
This may be part of the cause of the confusion about whether whose can only be used for people or animals.
A few views from usage guides:
From Merriam-Webster's Dictionary of English Usage (1994):
A few commentators take note of the conventional usage in which she
and her are used to refer to certain things as if
personified--nations, ships, mechanical devices, nature, and so forth.
The origin of the practice is obscure. The OED has evidence from the
14th and 15th centuries... The conventions are still observed:
[quotations from 1980s and 1970s sources referring to the four aforementioned categories]
The discussion goes on to note that some people object to the usage as sexist, but that it is not generally seen as a major issue compared to other problems of sexism in writing. The general recommendation is to err on the side of avoiding the usage.
The Columbia Guide to Standard American English (1993) takes on the issue more directly:
Some purists object to the use of feminine personal pronouns to refer
to inanimate things--boats, cars, nations, universities, Mother
Nature, the wind and weather, and the like. Some of these uses are
jocular; others are long-established conventions. In Formal language,
all but the most conventional of such uses (the college as she
reflects alma mater) are replaced by the neuter pronoun it, but at
all Conversational levels and in Informal writing, most people find no
problem with an inanimate referent for "She's a beauty!"
Fowler's Modern English Usage (3rd ed., 2004) brings up masculine as well as feminine personification. It begins by noting the demise of the Old English distinctions between masculine, feminine, and neuter nouns, concluding that eventually he and she came to mean only male/female persons or animals. However:
At the point of loss of grammatical gender, however, he began to be
applied "illogically" to some things personified as masculine
(mountains, rivers, oak-trees, etc. as the OED has it), and she to
some things personified as feminine (ships, boats, carriages,
utensils, etc.). For example, the OED cites examples of he used
of the world (14c.), the philosopher's stone (14c.), a fire (15c.), an
argument (15c.), the sun (16c.), etc.; and examples of she used of a
ship (14c.), a door (14c.), a fire (16c.), a cannon (17c.), a kettle
(19c.), and so on. At the present time such personification is
comparatively rare, but examples can still be found....
This concludes with recent examples referring to countries and yachts.
In my personal experience, it seems like this usage is no longer common except in three contexts:
She is occasionally used in formal and deliberately archaic oratorical references to abstract large entities, like countries, universities (and other abstract corporate bodies, like "the [Christian] Church"), weather/nature, etc. Many of these are traditionally associated with feminine gender and specifically mothers ("Mother country," alma mater, "Mother Church," "Mother Nature," etc.). She is also used for ships in this manner, but again the usage is old-fashioned. The only time I think I've ever heard he used was in a formal speech when referencing an element of nature after already making an allusion to a masculine Greek god associated with that element of nature -- in other words, a deliberate and explicit personification. People don't generally talk like that anymore, though, even in formal orations. I suppose we could include other personifications in English in this category, such as Death, who is often personified as a (masculine) "grim reaper" figure. It would thus be possible to say, "He [Death] comes for me," but this would generally be archaic usage today.
She sometimes occurs as very casual and informal affectionate references to a personal possession, particularly yachts and cars (and occasionally other machines) owned by men. Other property that is given a name by its owner may be referred to using the gender of the name, but even when people name their stuff, they often still say it.
It seems that some people have a tendency to casually assign gender to an animal of unknown or indeterminate sex and often just say he rather than it (which I think follows the pattern of the virus mentioned in another answer), particularly when ascribing agency or action to the animal. Again, this is mostly in informal speech situations and isn't technically referring to an "inanimate" object.
In general, I'd say to avoid these uses since they tend to be rare in contemporary English. Don't use (1) unless you want to sound very old-fashioned. And reserve (2) for if you're a man at a motor/boat club meeting admiring a car/boat and saying, "Gee, well, ain't she a real beaut'!"
Best Answer
Your usage of "itself" in this sentence is correct. You have used it as an emphatic pronoun, which serves to bring attention to the noun it follows. Since "machine" would be correctly referenced by the pronoun "it," the appropriate emphatic pronoun is "itself."
More reading: http://www.englishpractice.com/improve/reflexive-emphatic-pronouns/