If you're feeling frustrated during a conversation with someone, the cause could be that:
a) you're bored
b) you're tired and don't feel like engaging
c) you don't agree with the other person
d) your expectations (preconceived or not) are not being met
e) you aren't truly listening to what the person is saying and what is behind what they are saying so as to understand their perspective
Ways in which to handle the above-mentioned scenarios:
a) Cut out of the conversation. Two options: End it quickly or let it linger if you don't mind being bored. If you're bored and annoyed, the former action is likely ideal because when you're annoyed and bored, you're more apt to say something off the cuff and possibly offensive.
b) Deal with it if you must. If you are in a professional setting, do your best despite your lack of energy. Push forward. Take breaks and take care of yourself but focus on doing the best you can and let that be it. Don't beat yourself up for any mistakes. If not in a professional setting, be polite and tell the other person how you're feeling and exit the convo politely, or just converse as you would when tired. No harm in being tired when conversing.
c) Listen to what the other person is saying. If necessary, explain your position and you may wish to incorporate those aspects of the other person's viewpoints in on your explanation to specify your feelings and/or the objective evidence pertaining to those viewpoints to further validate your position and/or support the other person's perspective.
d) Again, listen closely to what is being said and make an effort to verify that you are doing what is possible on your end to move towards a solution. If you have expectations, ensure they are reasonable. Putting things in perspective mentally should help with either challenging or validating those expectations.
e) Listen. Truly listen. It cannot be emphasized enough how critical it is to not just listen, but to actually hear what the other person is saying. If you find yourself drifting elsewhere, focus your attention on the conversation by playing back the other person's words in your mind so are able to clearly review the content of the message being conveyed. Take a moment to pause and reflect before responding, if necessary.