If you believe that your work is esoteric, overspecialized, trivial, useless, of interest to nobody else, then it will be difficult to develop a happy relationship to it. In the humanities we often refer to our own work in these disparaging terms, thus internalizing what we think of as the larger society's vision of our work, and alienating ourselves from our sources of strength. We only do this work to get a line on our cv, for promotion, tenure, to get the next degree, etc... Right?
The "the humanities will save civilization" rhetoric does not really help, either. If only people studied humanities, then they would be great critical thinkers and citizens, and would never vote for Republicans. I'm sure you've all heard those arguments.
No. The answer is to remember that the exercise of the human intelligence is the greatest thing ever. Work that employs and expands the human intelligence can never be without value. In my case, I know for a fact that poetry is the greatest and most complex art form possible. The study of poetry is a marvelous thing, because it is one kind of intelligence applied to another. I get to match myself against Lorca every day and find myself wanting.
(When I meet people and they see the attitude I have to my work, they don't think it's useless any more. Usually it's more like "Hey, that's pretty interesting.")
You don't have to agree with me about my particular reasons for valuing my own work. I don't really care. I know my work is valuable, but what about yours? At some core level, don't you think that what you are doing is the most important thing that anyone can do? Or at least the thing that you ought to be doing?
Then you can be happily engaged in your research and writing, deriving satisfaction from it. Knowing you can do it well is just one component: you also have to believe it is worth doing.