Conversation so far:
What were his ideas about?
The Theodicy tries to justify the apparent imperfections of the world by claiming that it is optimal among all possible worlds.
Was he spiritual or religious?
Leibniz asserted that the truths of theology (religion) and philosophy cannot contradict each other, since reason and faith are both "gifts of God.
Did others agree with him?
CANNOTANSWER.

Question: Was he optimistic because of his beliefs and that he saw a purpose in things such as religion and philosophy?
Self-contained rewrite: Was Gottfried Wilhelm optimistic because of his beliefs and that he saw a purpose in things such as religion and philosophy?