Hi again DeAnn,
Do you mean you find yourself having that kind of depressed/hopeless thoughts when you say "I think about him I think about his behavior that I find in myself."
The way to deal with this would be based on what you feel comfortable with trying.
Clinical depression is treatable with counseling, medication, and other forms of treatment depending on its severity i.e. NLP (neurolinguistic programming) Neurofeedback aka biofeedback, natural alternatives- supplements/food changes, exercises. I believe that a combination of treatment options is best.
*If these are suicidal, self defeating (hopeless/helpless) kind of thoughts/behaviors, it would be of most help to work with a clinician face to face and the sooner the better.
If it is a severe depression that you're dealing with, medication would be the option at least initially to help stabilize one's brain chemistry. CBT is also effective if you're not open to medication for some reason. The Cognitive Behavioral Workbook for Depression: A Step-by-Step Program
Thoughts are self generated and one can learn how to manage them. It takes some practice. As the thoughts change, brain chemistry also can change.
It would help to be mindful of when these thoughts arise, how much time you allow them to hold your attention, how you reframe/redirect them and whether or not these thoughts serve any purpose.
Change Your Brain, Change Your Life: The Breakthrough Program for Conquering Anxiety, Depression, Obsessiveness, Anger, and Impulsiveness
Buddha's Brain: The Practical Neuroscience of Happiness, Love, and Wisdom