Problem Gamers – How to quit a campaign you have been playing for a long time?

This question already has an answer here:

I've been playing in a campaign for quite some time, about a year (I know some campaigns are not too long, but it's too long to simply say that's not my style of play).

I have some problems and I managed to manage them for a while because someone else was having problems with the same player (who was steaming from one side to another). other players, demanded that we do what they wanted and refused to accept the ideas of anyone else), then the player left and I thought that it was was the end, but now, I find that another player just did exactly the same thing. Player B is not so aggressive and does not throw out other ideas, but the whole campaign is now centered on them. Any connection between the NPCs is for them, to the point that whenever I want to talk to an NPC, I bring him out of the room to talk to him (and 90% of the time the other players just say that they follow and make me roll instead).
I play a thug so the only opportunity to do things without having the party nearby / constantly interrupting is the dungeons.

I want to go. I keep trying to find reasons to stay but I find myself stuck.
I have spent so many hours in this campaign, and do not get me wrong, I enjoyed the campaign but I am tired, so tired of being interrupted and ignored and treated like an idiot for not knowing things (I play for 2 years, most of them play for 10 years)

How can I leave while letting the SM know that there is no resentment and that all others know that I do not hate them or anything?