Ennui is often defined as boredom, listlessness, or discontent. But it's far more than that.
In theological terms, ennui is that sin that views one's life as meaningless, that falls to the temptation to imagine that the place where God has placed me is useless, that ultimately my life is of no value.
The crucial sin of ennui is to imagine that God has made a mistake, to believe that God has kept me from where I should be, or that there is more there, and that I am not there.
Ennui is thought to be a sin of middle age. In a way that's true, because middle age is when we look back on childhood dreams and realize that we have not fulfilled those, and that we will not fulfill them. But it's not a sin peculiar to middle age. Even children can be subject to it. Remember, for instance, when one is 13 or 14, and how the years seem to stretch out forever, and how we imagine that it will be an unimaginably long time until we can enter real life.
The answer to ennui is contentment. Contentment in the sense of knowing where God has placed us, and that He makes no mistakes. Of knowing the deep reality of what Jesus said in Matthew 6.8: "for your Father knoweth what things ye have need of, before ye ask him."
Your Father knows. Knows what you need, and when you need it. And in reality, you have had everything you need. That's the deep reality of our lives, that we live and move and have our being in God, a God Who knows your needs -- in every sense of the word -- and provides.
A sainted teacher once suggested that we especially pray for those tempted by ennui on Wednesdays. Which is appropriate, given that it's the day in the middle of the week, the time when many are tempted to this peculiar form of despair. But ennui is a sin to which all are tempted. Remembering Luther's explanation of the Our Father here is good: "God gives daily bread, even without our prayer, to all wicked men; but we pray in this petition that He would lead us to know it, and to receive our daily bread with thanksgiving."
Perhaps the root of sin is receiving God's blessings without thanksgiving. But to remember God's care and thank Him for it: this is the cure for ennui.