When a pimp calls to cheer you up, you know you have problems.

After Jeff Ragsdale, a stand-up comedian and actor from Harlem, was “near suicidal” following a painful breakup, he posted fliers around the city soliciting other forlorn New Yorkers to reach out.

“If anyone wants to talk about anything, call me (347) 469-3173. Jeff, one lonely guy,” read the fliers, which he plastered across the Upper West Side, Chelsea and the East Village in mid-October 2011.

A pimp soon responded with some free advice.

“You know, you’re too old to be posting your number on the streets, man,” he said. “What kind of chick would meet a guy from a street poster?”

He ended the exchange with an offer of “great women by the hour.”

Another man called to ask for advice about buying a co-op, and a Goldman Sachs trader gave him updates on the Occupy Wall Street protests. Others gave advice, and many vented about their own issues.

The first day, he got 100 calls and texts. A week after the flier went viral, he got a thousand texts and e-mails a day. To date — he’s still taking calls — 65,000 texts and calls have come in.

One day, he spent 16 hours on his smartphone.

People phoned from as far as Japan and Saudi Arabia. Lots of Canadians called, “maybe because they’re a lonely country,” Ragsdale, 40, said.

About 40 percent of callers are from the Big Apple.

“I think New York can be a particularly lonely place. It’s hard to meet people here,” he said.

Ragsdale has collected the messages in a memoir, “Jeff, One Lonely Guy” (Amazon), out Tuesday.

Reaching out

Messages received by Jeff Ragsdale in response to his flier

* Marta, 50s, from Ecuador, (917) 385-XXXX

I was walking down Fifth Avenue and saw your flier. I’m incredibly lonely, too. I’m the “lonely woman.” No family, no friends. I live in a tiny room of a shared apartment in Queens. You want to go for a walk next week?

* Betsy

I once went on a Craigslist date with a total stranger because it was his birthday and he had no one to celebrate with.

* Kathleen

Hi, is this Jeff, and was your sign posted in Union Square true? How are you doing now? I was really touched by your flier. I understand all about tough breakups. I just wanted to tell you that you are deeply loved.

* Felicia, 15, (845) 464-XXXX

I wanted to tell you how happy I am after adopting a shelter cat last week. His name is Aleister, after Aleister Crowley.

* Widow, 60, Westchester, (914) 576-XXXX

New York died before 9/11. It’s just about greed now, full of arrogant s- -theads . . . One daughter, she’s 29, has a master’s degree in communications. She works as a nanny. The other is unemployed living with her boyfriend.

* Goldman Sachs trader, (212) 357-XXXX

I’m not doing that well . . . I’m calling strangers who post fliers on the Internet from my trading desk . . . The economy’s in a major downturn, and we have Occupy Wall Street keeping us prisoner. It’s combative. We’re under siege here.

* (212) 854-XXXX

I wish you could adopt me.

* (212) 470-XXXX

And may the force be with you, Luke.

* Erica

I fell asleep on a lump of gigantic stuffed animals at Toys “R” Us.

* (718) 910-XXXX

May I suggest a book club? . . . Maybe take up an activity like bowling?

* Bret

Hey, me and my girlfriend are on Houston Street . . . What do you think about buying a co-op in this current real-estate market?

* Man, 65, Upper West Side

Write gratitude lists.

* Danielle, eastern Long Island

I dropped out of school today, am sick of it.

* Arnie, 42, Brooklyn

I was in the cage for seven and change. Grand theft auto and a couple of under-10 drug charges. I’ve been convicted four times. Started stealing at 10 for survival.

* (540) 471-XXXX

I miss the city a lot, though. Cow manure just isn’t the same as smog.

* Jane Ann, 48, NYC, (646) 258-XXXX

I’m a lonely New Yorker, too . . . I work in investment banking. People in my industry, well, Manhattan in general, are too busy for their own good. They aren’t living.

* Albert, (347) 441-XXXX

Think we’ll be lonely forever?

* Jermaine

I saw Adam Sandler in a supermarket. He looked sad.