This is from the first two lines of Rudyard Kipling’s poem “If”. The full quote is:
If you can keep your head when all about you
Are losing theirs and blaming it on you;
It is one of my favorite poems and one of the few I’ve ever committed to memory. The poem describes all of the wonderful qualities a person should aspire to attain: calm, patience, proper perspective, relating to the world, perseverance.
I like the first lines because they set the tone for the poem. The quote suggest the value in not getting carried away and going with the emotion of the crowd, even when they blame their plight on you. It suggests a Zen like attitude of relating to the world.
The full poem can be found here: http://www.poets.org/poetsorg/poem/if%E2%80%94