How to connect bezier curve endpoints with straight line
Here is a method to do it:


Select your vertices and press V to switch to Free Handles mode.
Select your vertices and the bottom handles and press S Y 0 to flatten on the Y axis.