Hey man, sorry that you're feeling this way in your friend circle, I'm kinda in a similar situation myself so I can empathize
To answer your actual question, I think something short and simple would probably be best. Start with a greeting, what you want, and why. An example would be something like, "Hey [name], I don't want to be friends anymore. I loved hanging out with you but I just don't want to feel like a third wheel". Add more detail if you want, maybe a sorry at the end. Use it more as a starting point. In the end it's up to you, that's just how would do it
Hey man, sorry that you're feeling this way in your friend circle, I'm kinda in a similar situation myself so I can empathize
To answer your actual question, I think something short and simple would probably be best. Start with a greeting, what you want, and why. An example would be something like, "Hey [name], I don't want to be friends anymore. I loved hanging out with you but I just don't want to feel like a third wheel". Add more detail if you want, maybe a sorry at the end. Use it more as a starting point. In the end it's up to you, that's just how would do it