ANSWER: Jesus began to teach about those whose spirit was poor, mentioned in your question, near the beginning of his public ministry. He used this topic as the foundational teaching on which he would not only explain and reveal the full intent of the Old Testament's laws but also as the starting point on how true Christians should think and act in their everyday lives. His discussion on the subject starts what is commonly called the Sermon on the Mount, which is arguably his most famous message.
2. And He opened His mouth and taught them, saying, 3. "Blessed are the poor in spirit, for theirs is the kingdom of heaven . . ." (Matthew 5:2 - 3, HBFV Bible throughout)
Surprisingly, only the book of Matthew (chapters 5 to 7) writes about the details of his message with the book of Luke (chapter 6) recording only select pieces. The opening sentences of this "sermon" are often called the Beatitudes or "beautiful attitudes" because they talk about the attitudes God highly prizes.
So, what exactly was the Lord discussing? One hint in understanding what Christ was referring to can be found by noticing the word "spirit" in verse 3 above. In the Holy Bible Faithful Version, and most other translations such as the KJV, NKJV, NIV and others, the word does not start with a capital letter. This signifies that the word is understood to not refer to the Holy Spirit, which is what makes someone a Christian (Romans 8:9), but to something else.
"Spirit" in this verse is referring to a person's frame of mind or their attitude. It is how a person thinks about the world around them and their own personal relationship with the Eternal. Barnes' Notes on the New Testament, commenting on Jesus's teachings, states to have a poor spirit means to have a lowly or humble view of ourselves. Other commentaries state the following in their notes on Matthew 5:3.
"Poverty of spirit is the opposite of pride, self-righteousness, and self-conceit; the spirit of the publican rather than of the Pharisee . . ." (A Commentary on the Holy Bible by J.R. Dummelow)
As was mentioned in the last comment above, an excellent contrast between the self-exalting arrogance God dislikes (especially among religious people) versus the contrite heart he is looking for can be discovered in the parable of the Pharisee and the publican (Luke 18:10 - 11, 13 - 14).
Those who have this "poor" attitude realize, in the core of their being, their utter need for God and their inability to save themselves. They are keenly aware that they humbly need his help and mercy every moment of every day. One popular worship song that conveys this understanding, found in many church hymnals, is called "I Need Thee Every Hour." It is a beautiful hymn sung with meaning for those who have become aware of their utter dependency on the Eternal to help them make it though life. Those who have this attitude are indeed blessed. Jesus stated they should rejoice and be filled with joy for great is their reward in heaven (Matthew 5:12)! It is a state of mind that all Christians should strive to attain.
The man who is poor in spirit is the man
who has realized that things mean nothing,
and that God means everything.
William Barclay (1907 - 1978)