One thing that helped me was to almost never check/call. I either c-bet about 2/3 pot or check/raise. With two spades, I would've c-bet 2/3 pot to give bad FD odds. Also, I would have almost no idea how good my hand is with a c/c, and it only got me in bad spots like this.
As played, I would've folded either the turn or the river.