Getting healthy durning ivf

So within the past year I have gained 40 lbs I am weighing at 181 due to a medication side effects. This is my first cycle of IVF I will start taking the birth control Friday I am wanting to lose weight during this process does anyone have any advice? And when and if I should refrain from caffeine