
Honestly I don't always handle it well, especially after a particular incident on another game that has just made me utterly wary of some forms of roleplaying in general. However, irregardless I do try my best to remain level headed and to send a tell to the other player letting them know I'm not comfortable with what's going on. Sometimes, unfortunately, I panic and burrow back under the nearest rock that I crawled out of - but that is something I'm doing my best to master as it's far from the most appropriate response... 
Rule of thumb however, placing irrational emotions aside:
- If you're uncomfortable, talk with the other person first. It might be easier said that done, and if it's someone you know won't take it well then it can be made all the harder. However chances are the other player might not even realize they were making you uncomfortable - we all have varying levels of what we're alright with in roleplaying and sometimes it's easy to forget that while the other person on the end of the screen might be acting in a poor fashion, they're still human and might not be aware they're causing a negative reaction. (This is the one thing I need to work upon the most, and I've been trying my hardest... Though I don't always succeed.)
- With that said, if you're uncomfortable then you shouldn't have to justify why. It's courteous to the other player, but if talking it out will only bring scorn or make you more anxious over the entire situation then there is no shame in going 'NOPE' and leaving prematurely. Mental well being and comfort come first, and you should never feel like you -have- to give in and compromise your ideals simply for the sake of piece. That's not to say arguing is the answer either, but in the end your feelings are valid and should be taken into account regardless of the circumstances.
- As others have said, enjoyment is paramount. If you're not enjoying the RP, then what is even the point to it all? Happiness is first and foremost in roleplaying for me, and without it I honestly don't see the point in continuing. That's not to say dark and boundary pressing roleplays aren't valid and I enjoy them immensely, but that's just the thing. -I- enjoy them and thus they bring me some form of happiness to engage in because it's just another avenue for storytelling. Not everyone else is the same, nor should they be expected to be so. If your expectations and enjoyment do not mesh with another person's, then there is no shame in admitting to it and moving on to greener pastures. So long as both parties are polite about it.

Rule of thumb however, placing irrational emotions aside:
- If you're uncomfortable, talk with the other person first. It might be easier said that done, and if it's someone you know won't take it well then it can be made all the harder. However chances are the other player might not even realize they were making you uncomfortable - we all have varying levels of what we're alright with in roleplaying and sometimes it's easy to forget that while the other person on the end of the screen might be acting in a poor fashion, they're still human and might not be aware they're causing a negative reaction. (This is the one thing I need to work upon the most, and I've been trying my hardest... Though I don't always succeed.)
- With that said, if you're uncomfortable then you shouldn't have to justify why. It's courteous to the other player, but if talking it out will only bring scorn or make you more anxious over the entire situation then there is no shame in going 'NOPE' and leaving prematurely. Mental well being and comfort come first, and you should never feel like you -have- to give in and compromise your ideals simply for the sake of piece. That's not to say arguing is the answer either, but in the end your feelings are valid and should be taken into account regardless of the circumstances.
- As others have said, enjoyment is paramount. If you're not enjoying the RP, then what is even the point to it all? Happiness is first and foremost in roleplaying for me, and without it I honestly don't see the point in continuing. That's not to say dark and boundary pressing roleplays aren't valid and I enjoy them immensely, but that's just the thing. -I- enjoy them and thus they bring me some form of happiness to engage in because it's just another avenue for storytelling. Not everyone else is the same, nor should they be expected to be so. If your expectations and enjoyment do not mesh with another person's, then there is no shame in admitting to it and moving on to greener pastures. So long as both parties are polite about it.