There is, I believe, somewhere in Pascal a wise thought: that two persons resembling each other do not present any interest when met singly, but create quite a stir when both appear at once. I have never read Pascal nor do I remember where I pinched that quotation. (Chapter Five)

Hermann must have pinched that quotation in Henri Bergson's Le Rire ("Laughter: an Essay on the Meaning of the Comic," 1900):

This seems to me the solution of the little riddle propounded by Pascal in one passage of his Thoughts: “Two faces that are alike, although neither of them excites laughter by itself, make us laugh when together, on account of their likeness.” (chapter IV)*

In the first two chapters of Despair Hermann twice repeats the phrase gomericheskiy smekh (roars of laughter):

Now that is a word I loathe, the ghastly thing! I have had none of the article ever since I stopped shaving. Anyway, the mere mention of it has just given me a nasty shock, broken the flow of my story (please imagine what should follow here—the history of mirrors); then, too, there are crooked ones, monsters among mirrors: a neck bared, no matter how slightly, draws out suddenly into a downward yawn of flesh, to meet which there stretches up from below the belt another marcipane-pink nudity and both merge into one; a crooked mirror strips its man or starts to squash him, and lo! there is produced a man-bull, a man-toad, under the pressure of countless glass atmospheres; or else, one is pulled out like dough and then torn into two.

Enough—let us get on—roars of laughter are not in my line! Enough, it is not all so simple as you seem to think, you swine, you! (Chapter Two)

To begin with, let us take the following motto (not especially for this chapter, but generally): Literature is Love. Now we can continue.

It was darkish in the post office; two or three people stood at every counter, mostly women; and at every counter, framed in its little window, like some tarnished picture, showed the face of an official. I looked for number nine…. I wavered before going up to it. …There was, in the middle of the place, a series of writing desks, so I lingered there, pretending, in front of my own self, that I had something to write: on the back of an old bill which I found in my pocket, I began to scrawl the very first words that came. The pen supplied by the State screeched and rattled, I kept thrusting it into the inkwell, into the black spit therein; the pale blotting paper upon which I leaned my elbow was all crisscrossed with the imprints of unreadable lines. Those irrational characters, preceded as it were by a minus, remind me always of mirrors: minus × minus = plus. It struck me that perhaps Felix too was a minus I, and that was a line of thought of quite astounding importance, which I did wrong, oh, very wrong, not to have thoroughly investigated. (Chapter Seven)

The name of Hermann’s wife, Lydia may hint at Lydia Stakhievna (“Lika”) Mizinov, a friend of Chekhov’s family. In a letter of Sept. 1, 1893, to Lika Mizinov (who found the word “egoism” in a dictionary and used it in every letter) Chekhov suggests that Lika names her sobachka (little dog) “Egoism:”

Dama s sobachkoy (“The Lady with the Little Dog,” 1899) is a story by Chekhov. The action in it begins in Yalta and ends in Moscow. Hermann met Lydia in Moscow. Lydia’s aunt Elisa (who married a French farmer and settled near Nice) had an estate in the Crimea (near Feodosia). According to Hermann, Lydia only cared for large dogs with pedigrees:

“I do only hope,” said my wife, “they don’t bring it with them as last time.”

“And even if they do … Why should you bother?”

A silence. Small blue butterflies settling on thyme.

“I say, Hermann, are you quite certain it was Wednesday night?”

(Is the hidden sense worth disclosing? We were talking of trifles, alluding to some people we knew, to their dog, a vicious little creature, which engaged the attention of all present at parties; Lydia only cared for “large dogs with pedigrees”; pronouncing “pedigrees” made her nostrils quiver.) (Chapter Two)

While sleeping at a hotel with Felix, Hermann dreams of belaya lzhesobachka (a small white mock dog).

Oh, how I cherish the hope that in spite of your émigré signature (the diaphanous spuriousness of which will deceive nobody) my book will find a market in the U.S.S.R.! As I am far from being an enemy of the Soviet rule, I am sure to have unwittingly expressed certain notions in my book, which correspond perfectly to the dialectical demands of the current moment. It even seems to me sometimes that my basic theme, the resemblance between two persons, has a profound allegorical meaning. This remarkable physical likeness probably appealed to me (subconsciously!) as the promise of that ideal sameness which is to unite people in the classless society of the future; and by striving to make use of an isolated case, I was, though still blind to social truths, fulfilling, nevertheless, a certain social function. And then there is something else; the fact of my not being not wholly successful when putting that resemblance of ours to practical use can be explained away by purely social-economic causes, that is to say, practical use can be explained away by purely social-economic causes, that is to say, by the fact that Felix and I belonged to different, sharply defined classes, the fusion of which none can hope to achieve single-handed, especially nowadays, when the conflict of classes has reached a stage where compromise is out of the question. True, my mother was of low birth and my father’s father herded geese in his youth, which explains where, exactly, a man of my stamp and habits could have got that strong, though still incompletely expressed leaning towards Genuine Consciousness. In fancy, I visualize a new world, where all men will resemble one another as Hermann and Felix did; a world of Helixes and Fermanns; a world where the worker fallen dead at the feet of his machine will be at once replaced by his perfect double smiling the serene smile of perfect socialism. Therefore I do think that Soviet youths of today should derive considerable benefit from a study of my book under the supervision of an experienced Marxist who would help them to follow through its pages the rudimentary wriggles of the social message it contains. (Chapter Nine)

After the Pascal quote Bergson's Laughter proceeds as follows:

It might just as well be said: “The gestures of a public speaker, no one of which is laughable by itself, excite laughter by their repetition.” The truth is that a really living life should never repeat itself. Wherever there is repetition or complete similarity, we always suspect some mechanism at work behind the living. Analyse the impression you get from two faces that are too much alike, and you will find that you are thinking of two copies cast in the same mould, or two impressions of the same seal, or two reproductions of the same negative,--in a word, of some manufacturing process or other. This deflection of life towards the mechanical is here the real cause of laughter.

And laughter will be more pronounced still, if we find on the stage not merely two characters, as in the example from Pascal, but several, nay, as great a number as possible, the image of one another, who come and go, dance and gesticulate together, simultaneously striking the same attitudes and tossing their arms about in the same manner. This time, we distinctly think of marionettes. Invisible threads seem to us to be joining arms to arms, legs to legs, each muscle in one face to its fellow-muscle in the other: by reason of the absolute uniformity which prevails, the very litheness of the bodies seems to stiffen as we gaze, and the actors themselves seem transformed into automata. Such, at least, appears to be the artifice underlying this somewhat obvious form of amusement. I daresay the performers have never read Pascal, but what they do is merely to realise to the full the suggestions contained in Pascal’s words. If, as is undoubtedly the case, laughter is caused in the second instance by the hallucination of a mechanical effect, it must already have been so, though in more subtle fashion, in the first. (chapter IV)

At the end of his essay Chto takoe poeziya ("What is Poetry," 1903) I. Annenski (who wrote poetry and criticism under the penname Nik. T-o, “Mr. Nobody”) compares death to Polyphemus (in Homer’s Odyssey, a Cyclops from whom Odysseus conceals his identity under the pseudonym Outis, “Nobody”) and says that modern poetry is the child of death and despair:

Whence this disharmony? How did it arise?
In the general chorus, why this solo refrain?
Why do our souls not sing like the sea
and why must the thinking reed complain?
(transl. F. Jude)

*According to Hermann, from the end of 1914 to the middle of 1919 he read exactly one thousand and eighteen books. Since Bergson was very popular in the pre-Revolutionary Russia, Hermann could have read Le Rire in Russian:

This is a convincing lead from Pascal to Bergson. We have to be in agreement here. I believe that the fiat: minus x minus = plus is recast in a subtler way in Invitation to a Beheading:

"You couldn’t make out anything of it, it was all gaps and jumble, and made no sense to the eye—yet the crookedness was no ordinary one, but calculated in just such a way as to … Or rather, to match its crookedness they had made … No, wait a minute, I am explaining badly. Well, you would have a crazy mirror like that and a whole collection of different ‘nonnons,’ absolutely absurd objects, shapeless, mottled, pockmarked, knobby things, like some kind of fossils—but the mirror, which completely distorted ordinary objects, now, you see, got real food, that is, when you placed one of these incomprehensible, monstrous objects so that it was reflected in the incomprehensible, monstrous mirror, a marvelous thing happened; minus by minus equaled plus, everything was restored, everything was fine, and the shapeless speckledness became in the mirror a wonderful, sensible image; flowers, a ship, a person, a landscape. You could have your own portrait custom made, that is, you received some nightmarish jumble, and this thing was you, only the key to you was held by the mirror." (Chapter 12)

Not to deviate from your point, but I believe this is Cincinnatus's mother speaking in a moment of absolute clarity from the novel.

I kept netki (nonnons) in mind. The characters of Priglashenie na kazn' (“Invitation to a Beheading,” 1935) include the jailer Rodion and the lawyer Roman. In Dostoevski’s Prestuplenie i nakazanie (“Crime and Punishment,” 1866), a novel that Hermann calls Krov' i slyuni ("Crime and Slime"), the name of the main character is Rodion Romanovich Raskolnikov.

VN's neologism, netki comes from net (no; not). Explaining the meaning of the verb stushevat'sya (that for the first time occurs in his novel "The Double," 1846), Dostoevski uses the phrase soyti na net (come to naught):