The speaker is such a sheep. No, really. He's a lovable little lamb frolicking out in the hills. OK, not exactly, it's still just a metaphor. But comparing himself to a sheep is the speaker's way of showing his humility. He places himself completely in the power of the nurturing shepherd. Another way to look at it: God is to the speaker what humans are to domesticated animals. Any success or comfort that the speaker has attained is not through his own doing; the Lord has provided it. The phrase, "God helps those who help themselves" doesn't really apply to the poem, as the speaker does not help himself. Good fortune just continues to rain down upon him.
The speaker doesn't seem to be a man who's enduring great hardship, though he may have had hardships in the past. In fact, he reminds us of Ned Flanders from The Simpsons. Like Ned, the speaker has nothing to complain about and maintains an almost impossibly sunny attitude in the face of everything. (When Ned was asked whether he liked mosquito bites, he replied, "Mmmm! Love to scratch 'em!" Now that's optimism for you).
God isn't testing the speaker, as God tested Job. Pleased as punch with his position in the world, the speaker is probably pretty wealthy, healthy, and secure. He feels safe from his enemies, though that fact in itself is pretty interesting: the guy has enemies. The poem sometimes feels like an unrealistically perfect vision of the world (though maybe that's because it describes a "spiritual" world that exists only in the soul), and the presence of enemies reminds us of dangers. It might also lead you to think that perhaps the speaker isn't completely perfect, because not everyone in the world seems to like the guy. Still, the speaker likes to think he is a morally upstanding guy who has followed the "paths of righteousness" as best he can.
Readers who believe that King David wrote Psalm 23 often point out that the imagery of shepherding aligns with the fact that David was a shepherd as a young man. At the very least, the speaker is familiar with the humble pastoral life.