Sean Spicer credits his Catholic faith for helping him get through the stress of working as President Donald Trump’s press secretary.

In an interview, the Irish American Spicer, who spent seven months working for the White House, said his Catholic faith “sustained” him through the long hours, relentless criticism, harassment from reporters, and daily abuse from the boss, the Daily Mail reports.

Summing up his time there, he said: “You were truly in a whole new matter what I did it was going to become a meme.”

Read More: Sean Spicer says he's "one of the most popular guys in Ireland"

As Trump’s first press secretary, the Spicer was mercilessly ridiculed on social media and was portrayed by actress and comedian Melissa McCarthy on Saturday Night Live, mocking his anger and constant gum chewing.

“The hardest part is that as a human being when someone says something about you you want to push back say that's not true. But my job was to just suck it up.

“I used to chew a lot of gum, in case you hadn't seen the Melissa McCarthy stuff. Who cares?”

Straight out da bushes @nbcsnl #snllivecoasttocoast #snl

A post shared by Melissa McCarthy (@melissamccarthy) on

“Some people drink coffee, I chew a lot of cinnamon gum and suddenly you wake up and there's memes about you on Twitter. The smallest little thing on every single thing I did became an issue.”

One day he went to the Apple store to buy his wife a present, but he was filmed and the footage was posted online. President Trump saw the footage and called him to ask why he was at the Apple store.

He also said he had to stop taking Ubers because drivers always recognized him.

Spicer said his faith helped him get through the intense scrutiny.

He said: “If you believe that God has a plan this is part of it, some days are going to be better than others.”

Read More: Melissa McCarthy takes Sean Spicer for a spin through the streets of New York

Spicer said that after praying he found himself asking: “Could I have done that better, were you the best person you could be today?”

He added: “There's a reason we call it Catholic guilt; are you reflecting on it, saying can you be better.”

Spicer’s memoir The Briefing, about his time in the White House, is due out next month.

He said that writing it was "very cathartic" and that he had "saved a lot of therapy bills" by writing his story down.