Kind of. CBT is (oversimplification incoming) just every time there’s a negative thought, you make a habit of thinking a positive thought, so then your brain starts associating the connection. Basically retraining your brain to naturally go from negative to positive path, and over time your brain gets rewired to do it without consciously doing it.