I am in the same boat. 6 months ago, I quit my job because the management and engineering team I worked with were extremely difficult to work with. I had poured my heart out in the company. Grew the team from 1 to 6 developers. Worked extreme long hours because I enjoyed building the product.
I knew I didn't want to code after that. I enrolled in an online business management program. Joined a two people company as an intern two weeks ago. I am finally getting excited about building something new from scratch and I am learning quite a lot at the same time.
Take a break and spend time doing the things you love. You are extremely smart and aware about the problems you face. Learn that thing you always wanted to learn. You might get disinterested and may want to quit it but it's very important to keep at it.
If you join a team, I would advise you to join a small team with less or no politics.