I am also very sorry for your loss.
With all that going on - and with a propensity to gain weight because of your PCOS - I think that a 5
pound gain is not nearly so big as it might have been. You clearly have not been eating quite as bad a
diet as your post implies. Maybe there was not quite as much junk as you remember it being. Maybe the depression is talking in part...
I suppose that the glimmer of hope is there in that you have seen a definite demonstration of the fact that you are ovulating too. Try to focus on this single positive aspect of the recent sad events. I think that is what I would be doing in your shoes...
You now know that it is perfectly possible for a PCOS lady to lose weight effectively so losing those 5
pounds and continuing with your project is within your sights.
I too would suspect that you should take things a little easier with the exercise at first - and I would be asking doctors (and indeed specialists) for their advice.
Prior to my operation last year - I was walking a minimum of 11 miles a day and doing various exercise classes. I was very keen to get back into my project and was basically told that I had to not do any exercise classes for 6 weeks but that I could build up my walking. I was allowed to do a slow 1 mile walk the day after I got out of hospital - and build it up by a mile a day. I could walk - but not at my normal pace. I was also told not to do much in the way of bending, stretching or lifting anything.
Maybe you will get permission to do something similar yourself... It may be that you can start something - but not your normal routine.