I think this is his major problem and the one he needs the most therapy for, more than for his grief and depression. Because it will never happen so he will never be content.
Somehow, and I presume it was the way he was brought up, he has acquired the belief that he is at least equal in rank to William, and in fact should be the heir and subsequently the king himself.
I know Diana said something about bringing the boys up equally, and that's absolutely right on a personal level, treated equally, loved equally etc, but in a system like the royal family with one monarch, it needs to be clear that despite being equally valued as people, in rank and role the heir will always be above anyone else and the job, which is a very valued and important job, of the siblings, is to support the heir. Somehow that message didn't get through to Harry and never has, and this is his biggest problem.
All his moaning is because he isn't perceived as being equal in rank to William. He and Meghan can't seem to get over the fact that they will never be king and queen. I do believe that when they talked about Meghan shaking up the traditional monarchy etc, they did think that because they were so popular then somehow he might be king alongside william.
It's ridiculous really, they're in their forties but acting like jealous toddlers. He could have had a lovely royal life like princess Anne or prince Edward seem to, yet chose not to.