We only criticize ourselves in order to win the praise of others.

[On ne se blâme que pour être loué.]

François VI, duc de La Rochefoucauld (1613-1680) French epigrammatist, memoirist, noble
Réflexions ou sentences et maximes morales [Reflections; or Sentences and Moral Maxims], ¶554 (1665-1678) [tr. FitzGibbon (1957), ¶524]
    (Source)

This maxim came from the 6th ed. (1693), published by Barbin more than twelve years after La Rochefoucauld's death. It is not present in many collections.

Compare to ¶149 and ¶327.

(Source (French)). Alternate translations:

We blame ourselves only to extort praise.
[pub. Donaldson (1783), ¶363]

When we seem to blame ourselves; we mean only to extort praise.
[ed. Carvill (1835), ¶318]

Man only blames himself in order that he may be praised.
[tr. Bund/Friswell (1871), 1693 ed.]

We only blame ourselves in order to be praised.
[tr. Tancock (1959), ¶554]