A California megachurch pastor who spoke openly about his battle with depression died by suicide Monday night, church officials said.

Jarrid Wilson, 30, was a pastor with the Harvest Christian Fellowship Church in Riverside, where he gave impassioned sermons on mental health issues, according to church officials.

“Jarrid also repeatedly dealt with depression and was very open about his ongoing struggles,” senior pastor Greg Laurie wrote Tuesday on the church’s blog. “He wanted to especially help those who were dealing with suicidal thoughts. Tragically, Jarrid took his own life.”

The circumstances surrounding his apparent suicide were not immediately released.

Hours before his death, Wilson took to social media about mental health struggles.

“Loving Jesus doesn’t always cure suicidal thoughts,” Wilson tweeted on Monday. “Loving Jesus doesn’t always cure depression.”

Wilson joined the church in early 2018 and founded an outreach program called Anthem of Hope to help people dealing with depression.

“Sometimes people may think that as pastors or spiritual leaders we are somehow above the pain and struggles of everyday people,” Laurie wrote. “We are the ones who are supposed to have all the answers. But we do not.”

Wilson — who authored several books including “Jesus Swagger” — is survived by his wife, Juli, and their two sons.

“My loving, giving, kind-hearted, encouraging, handsome, hilarious, give the shirt [off] his back husband went to be with Jesus late last night,” Juli posted on Instagram Tuesday. “Suicide doesn’t get the last word. I won’t let it. You always said ‘Hope Gets the last word. Jesus gets the last word.’”