Daily repetitive transcranial magnetic stimulation (rTMS) is FDA approved to treat depression, obsessive-compulsive disorder (OCD), or help smoking cessation. Research suggests that timing the delivery of a TMS pulse relative to an endogenous brain state may affect efficacy and short-term brain dynamics. TMS pulse timing studies to date have largely focused on immediate effects, over minutes and hours. We have developed a novel closed-loop system where a TMS pulse train is triggered by a patient’s EEG rhythm. We used this to deliver personalized EEG-triggered repetitive TMS (rTMS) to major depressive disorder (MDD) patients undergoing daily treatments over six weeks (30 sessions). We report results of applying rTMS, either synchronized or unsynchronized to endogenous brain rhythms (alpha), over a six-week treatment period (30 treatment sessions). When rTMS is applied over the dorsal lateral prefrontal cortex (DLPFC) and synchronized to the patient’s prefrontal EEG alpha rhythm, patients develop strong alpha phase entrainment over a period of weeks, both over the stimulation site as well as in a subset of areas distal to the stimulation site. In addition, at the end of the course of treatment, this group’s entrainment phase shifts to be closer to the phase that optimally engages the distal target, namely the anterior cingulate cortex (ACC). These entrainment effects are not observed in the group that is given rTMS without initial EEG synchronization of each TMS train. Our results are consistent with the hypothesis that the phase of prefrontal alpha represents a gating mechanism linked to states of greater excitability both locally over the TMS site as well as to distal target structures. The entrainment effects build over the course of days/weeks, suggesting that these effects engage neuroplastic changes which may have clinical consequences in depression or other diseases.