Great question, and one with very deep historical roots. The ancient Stoics, for example, thought that remorse and regret were not compatible with being a true Sage, and I think the same arguments they give about these responses would also apply to those of disappointment or frustration when things don't go as you had hoped they would. But to extend this way of thinking even further, you might then go on to ask whether it is even ever really rational to hope for something that is not under your own control. For the Stoics, the only thing that is under our control (or, at least, can and should be under our control) is how we react to things. As a result, such "bad" reactions as remorse, regret, disappointment, or frustration are not the right way to respond to things that happen in the world. The true Sage would understand how the world works so well that nothing he or she would ever do would give rise to remorse or regret. Similarly, the Sage would understand the world so well that nothing would frustrate or disappoint him or her, because the Sage would never be so irrational as to hope for something that was not the ways things really are or will be. The Sage is one who simply wants the world to be the way it actually is, so that one's will is perfectly aligned with what actually has happened, does happen, and will happen.
Now, many people would question this Stoic view as being "morally challenged," at best. It sounds, for example, like the Stoic Sage is someone whose response to a school bus full of innocent children hanging precariously over a cliff, but slowly tipping towards the point where it will surely fall over the cliff, would be something along these lines. "Hmmm...I see that the bus will go over the cliff and all those children will die on the rocks below. Well...that's fine with me!"
If this sounds like something has gone wrong in the Stoic view, then you can apply that to your thought. If the acquisition of something (such as a certain job) seems like it would bring genuine benefits, all things considered, then it strikes me as both natural and also reasonable to feel at least some disappointment or frustration if one does not obtain the valuable thing. The Stoics denied that things like jobs (or, for that matter, even loved ones) actually have any genuine value. Many people will find this element of the Stoic view implausible. If things do have value, then it is right for us to want them, and part of the logic of desire is to feel some kind of dissatisfaction/discomfort if our desires are not met.
So perhaps a more fruitful way to think about this question is not to frame it in terms of contraries (either we should feel frustration or not), but instead to think about what levels of frustration or disappointment are appropriate to the specific episode in which we do not get what we desire. Here, I think most philosophers will adopt a view that is not as extreme as the Stoic view, but which approximates that view more closely than the very exaggerated (and, I suspect, self-absorbed) way in which most people respond to the (often very petty) frustrations of their lives. We are encouraged to be "philosophical" about things, which means, I suppose, that we are supposed to evaluate the actual worth of things as accurately as we can, and also to remind ourselves of the generally very poor position we are in with respect to assessing the actual long-term value, all things considered, of what we find ourselves desiring.
A small anecdote might help here. I was very frustrated in my career for many years, and sometimes came close to being offered jobs that I know I would have accepted had they been offered at the time. I also now think, in retrospect, that accepting at least some of those jobs would have actually hindered my career even more than what I was already finding frustrating at that time, so...actually, it turns out to have been a good thing for me that I did not get what I wanted so badly at that time. Reminding oneself of such things can certainly help to allay some of the more negative aspects of the experience of frustration.
But if a desire really is for something good, and one does not manage to get the good, then it seems to me that at least some level of disappointment is quite reasonable, especially if that disappointment can help to motivate a continued effort to get some version of the good that was missed this time, or a better line of approach, so that one's next efforts might be more successful.