How can I get over depression without changing behavior that led to it?

Unclear. If there is identifiable behavior that lead to depressive sx, it is unlikeyly to change uless the behavior changes.Of course it depends on the specifics.
U have UR reasons. I love these intentionally withholding & mysterious questions. So let's say you broke up with bf/gf because it was "the thing to do!" still, there's a deep sense of loss. You go through a grief process (which has anger & depression in it). Open yourself to the healing process (which leads to letting go & acceptance)... Of course, i could have misread your mysterious question quite a bit...
Really? Maybe you can be dosed with a series of escalating doses and combinations of various pharmaceuticals...But if you you have awareness of a "behavior that led to it" it would be quite interesting to understand why you would want to continue that behavior.