How can I leave a game without being punished?
Putting it bluntly; you can't. If you leave matches in-progress, you run the risk of suffering LeaverBuster penalties.
Why do you not allow players to leave a game if they're having a bad time?
Because you leaving makes the match way less fair for the rest of the players- giving at least four other players a bad time, just because you had one.
When wanting to leave, and being forced to stay or risk punishment, it makes me feel trapped, like I'm being punished and abused, even when I've done nothing wrong, and all I want to do is stop playing.
If PVP sometimes stresses you out to the point you want to leave matches in-progress, might I recommend stepping down to bot matches? I imagine you're less likely to run into stressful situations, and even in the off-chance you do, it won't be a huge loss for the team to be down one member. You'll still incur punishments, though, so bear that in mind.
Ultimately, the reason you're required to commit yourself to a match from game start to game end is because you signed up to play a game with four to nine other players - all of whom want an equal match. You ditching them just because you start having a bad time makes them have a bad time. If the matches are stressing you out to the point you want to leave, try to find something in the match to make it more enjoyable - or, as I mentioned earlier, step down to a less stressful difficulty/gamemode.
And, of course, if it's the other players in the match that are making it unenjoyable, mute them. If they're flaming, spam-pinging, or emote-bm'ing, use the respective mutes. But you shouldn't screw over your four other teammates, and potentially ruin the game for up to nine other players just because you stopped having fun.