Laugh and the (whole) world laughs with you(; weep and you weep alone) proverb
When you are happy, people will want to be near you and share in your happiness, but they will shun you when you are upset.
A: When I won the match, I was celebrated as a hero. Now that I've lost, no one seems to care about me. B: Laugh, and the world laughs with you; weep, and you weep alone.
I know she's still upset about the death of her beloved dog, but Mary's distress has made people find her aloof and unfriendly. As the proverb has it: "Laugh, and the world laughs with you; weep, and you weep alone."
This proverb first appeared in 1883 in Ella Wilcox's poem "Solitude."