H.P Lovecraft created a Horrific world to escape a Nihilistic universe

"We live on a placid island of ignorance in the midst of black seas of infinity, and it was not meant that we should voyage far. The sciences, each straining in its own direction, have hitherto harmed us little; but some day the piecing together of dissociated knowledge will open up such terrifying vistas of reality, and of our frightful position therein, that we shall either go mad from the revelation or flee from the light into the peace and safety of a new dark age."


Cosmic Indifference

Though cosmicism appears deeply pessimistic, H.P. Lovecraft thought of himself as neither a pessimist nor an optimist but rather a "scientific" or "cosmic" indifferentist, a theme expressed in his fiction. In Lovecraft's work, human beings are often subject to powerful beings and other cosmic forces, but these forces are not so much malevolent as they are indifferent toward humanity.

Fate/Hopelessness

Often in Lovecraft's works the protagonist is not in control of his own actions, or finds it impossible to change course. Many of his characters would be free from danger if they simply managed to run away; however, this possibility either never arises or is somehow curtailed by some outside force, such as in "The Colour Out of Space" and "The Dreams in the Witch House"

Irrelevance of mankind

Lovecraft made frequent reference to the "Great Old Ones": a loose pantheon of ancient, powerful deities from space who once ruled the Earth and who have since fallen into a deathlike sleep. This was first established in "The Call of Cthulhu", in which the minds of the human characters deteriorated when afforded a glimpse of what exists outside their perceived reality. Lovecraft emphasized the point by stating in the opening sentence of the story that "The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents."

Forbidden Knowledge

Many of his characters are driven by curiosity or scientific endeavor, and in many of his stories the knowledge they uncover proves Promethean in nature, either filling the seeker with regret for what they have learned, destroying them psychically, or completely destroying the person who holds the knowledge.

Sources:

H.P Lovecraft
Cosmicism