What does Jesus have to do with contentment?
Discontentment is generally caused by not having something we want:
For most people, the things that we want are not bad in themselves (e.g., a new car). Some of the things we want are actually very good (e.g., a better relationship with a child, parent, or spouse; financial soundness). In fact, our longing for things that are "good" or "right" can be especially frustrating because we feel righteous and just in our desire.
Wants are satisfied either by:
B is better--nothing to maintain, no payments to make, no wear-and-tear, and no risk of loss, theft, vandalism, or reversal. Option A--getting what we want at the moment--actually does not solve the problem of discontentment; it merely removes one item from the list of wants. B is also better with respect to the "good" wants such as better family relationships. If our contentment is based on getting, or keeping, what we want, say a better marriage, then we will be slaves to circumstances, living in fear that the improved situation will turn sour again. Thus only B provides real freedom from discontentment.
So how do you not want something? Trying to not want won't work, no matter how hard you grit your teeth, squint your eyes, or clinch your fists. Picture the discontentment as a hole in your heart. And picture the hole in your heart as an empty glass. Trying to guard the top of the glass from wantful thoughts will not work. But if the glass is filled with water, there will be no need to strain the mind to keep the wantful thoughts out, because the glass is already filled--there is simply no room for anything else. No need to play mind games or do complex mental exercises--the glass is filled.
God designed humans to be right-side-up glasses filled with His Spirit. We were meant to have fellowship with our Creator and to get our joy from Him. Without God's Spirit we are discontent, unfulfilled, and dysfunctional--like a two-legged table. But when we let Him fill us, we do not have want, because we are completely fulfilled. This applies to Christians as well as those who have not placed their trust in Christ (see Why do Christians experience discontentment and discouragement?).
So how do we get filled with God's Spirit and experience continual fellowship with Him in order to have complete fulfillment? Apart from Christ, every person is spiritually dead--the glass is upside-down. Through Jesus Christ, however, God has provided a way for us to be forgiven of sin and restored with His Spirit. Jesus has paid the penalty for sin for every person who is willing to receive the payoff as a gift. When we receive Christ as God's gift to us, the Spirit of Christ Himself fills us.
When Jesus said, "He who comes to Me shall not hunger, and he who believes in Me shall never thirst," He was not talking about food and water. He was addressing the emptiness—the want and discontentment—that we have in our hearts. God designed human beings to be satisfied with Him. Without Christ, we cannot get our spiritual void filled:
Jesus said that He has overcome the world. He gives us victory over the never-ending chase for better circumstances in the world. Think about these verses, picturing your heart as a glass that needs to be turned right-side-up and filled. Before you read the verses, ask God to give you wisdom to understand them:
"These things I have spoken to you so that My joy may be in you, and that your joy may be made full.
John 16:33"These things I have spoken to you, so that in Me you may have peace. In the world you have tribulation, but take courage; I have overcome the world."
John 14:27"Peace I leave with you; My peace I give to you; not as the world gives do I give to you. Do not let your heart be troubled, nor let it be fearful.
How do we get filled by the Spirit of Christ? Ask. Open your hand and tell God in prayer that you want to receive Christ into your heart, exchanging all you are for all He is.