Should I finish my PhD?
Your mental health is the most important factor in this equation. PhD's are hard, and demotivating, and exhausting. But the best PhD is a completed PhD! It sounds like you've got everything you need to finish, you just need to full together the threads that make up a thesis. 

Often people get most of the way through a PhD and have not taken a holiday in years. When was the last time you took a holiday or just some time off? 

Make a plan of exactly what is needed to finish. What are your publication requirements? Structure out what the thesis will look like and define any loose ends that need to be finished. Make a list of these things and plan out - week-by-week when you want these completed by. If the end is in sight, you'll find that motivation will return - like a marathon running who has hit the wall but can see light at the end of a tunnel. These feelings are so natural - almost everyone I know who did a PhD experienced it!

And with regards to you thinking your thesis is mediocre at best. EVERYONE thinks that! I'm not going to tell you that it's better (because I don't know). But statistically, half of PhD graduates wrote a thesis that is average or worse than average. I know mine certainly was! Who cares? If you do enough to pass, then it really doesn't matter. And the saving grace is that very few people will ever read and understand the thesis enough to work that out! 

You've got this! Remember to prioritise a good work-life balance as in the long run, it will serve you far more effectively than if you crammed for the next year!