Anthony Pedersen sat in his painting shed and took stock of all that had gone wrong. He was divorced years ago, he battled a drinking problem, and at one point, he lived in his car. That was after an art gallery told him his work would never sell.

A death in the family last week pushed him to the brink, and Pedersen, surrounded by his paintings, considered taking his own life. But what to do with his art?

“I thought, ‘Maybe I should give away all these paintings before I do that,’ ” Pedersen said.

His thoughts about harming himself subsided, but the idea remained, he told The Washington Post on Sunday: Why not send these works into the world, or at least Orange County, Calif., in an exchange of pure expression and happiness?

That idea bloomed into a scavenger hunt, of sorts, fueled by social media.

Pedersen, 36, under his artist name Octopus/Caveman, seeded Orange County with four paintings Friday and Saturday, then posted photos on Twitter with hints to their locations. They included a plea to send photos once they were discovered.

“I only ask that you give this painting a good home,” wrote Pedersen, an intake manager at a law firm by day. “I’d love to see my painting with its new owner. Have a great life together.”

The response was almost too fast for Carrie Murphy.

She awoke at 3 a.m. Saturday and was scrolling through Twitter when she saw the clues. Murphy jumped in her car and drove 30 miles to a Rainbow Donut shop in Westminster. The painting had already vanished, she told The Post on Sunday.

Yet Murphy, an artist herself, was undeterred. She reveled in the hunt, despite the distance from her home in Laguna Niguel. Drizzle splattered her windshield as she set out for the next clue: A painting of a green man left against a wall at Ocean View High School in Huntington Beach.

That, too, was a dry hole, she said.

Pedersen had planted the other paintings hours later. One, depicting a robot with a beating red heart, was left against a sign outside Cyprus College near Anaheim. Murphy loaded her son, along with her husband — fresh off a flight from Thailand — into the car and roared off to the college.

The painting was gone, Murphy thought. But it had been blown over by the wind and lay flat on the grass. She picked up and held her prize: an Octopus/Caveman original.

“It was the most exciting thing. It felt like the lottery,” Murphy said. “And knowing it’s a treasured piece of art … it gave me so much joy.”

A man discovered the fourth painting at a park in Huntington Beach. “hello thanks you so much for the painting it was [such] a weird coincidence that I found it,” he wrote on Twitter.

Suddenly, the rejected artist had found an audience after returning to the studio only last year.

Pedersen paints with “the cheapest stuff you can imagine,” he said. Paint and brushes come from Walmart. He is a self-taught painter, and when he sits down, he has no firm idea about what spills out.

He may go through several paintings, one layered on top of another, he said, before he creates something like a lovelorn robot.

Murphy inspected the painting’s edges and discovered those layers of experimentation and process. “I will have to find a special place for it,” she said. “I know there’s a lot of history on that canvas.”

The gratitude has moved in a cycle. Murphy contacted Pedersen and told him what her find meant to her. He explained his bout with depression, and that his idea had sparked a deep satisfaction in his own work and what he has done for Murphy and others.

“I told him, ‘I hope you realized how much joy you are providing,’ ” Murphy said.

“I was really moved. She seemed excited about it,” he said. “Her joy in finding that was fantastic.”

Pedersen is working through what comes next. Maybe an expansion to San Diego. Pedersen thought perhaps there was a way to connect the paintings and the location in a more deliberate way.

But that process will come later. On Sunday, he left a vivid yellow abstract work at a parking garage in Claremont — number five in a growing series.

If you have feelings of self-harm, call the National Suicide Prevention Lifeline at 800-273-TALK (8255). You can also text a crisis counselor by messaging the Crisis Text Line at 741741.

Read more: