First of all, kudos to you for getting through the last 3 years, they sound tough and you deserve huge credit for getting to this point.
As @Amnesty has said you’ve chosen a lofty goal and I’d agree largely with that post. A marathon in the middle of a build up to a triathlon is rarely a good idea - the recovery from a marathon can be huge so I would give this careful consideration. I would also be recommending that to start with shorter distances to build up fitness and confidence before thinking about an IM, but that is obviously your choice to make.
A number of things struck me from your post
These are key I think. IM Whistler might be a realistic target, it might not be. At the moment it strikes me that you don’t know that yet either. Give yourself a period to train consistently before making a definite decision whether an IM should be on your radar.
You might have time to train but your body may not be ready for it. After a long period of illness and not training whatever plans or races you decide on, you need to be extremely conservative in your approach. High motivation is a great thing but if the body is unused to training any goals you might have may end up out of the window because of injury and niggles.
Please don’t see the above as negative - it’s not meant to be. Coming back from a period of mental ill health can have many challenges in and of itself and while your goals have the potential to be very positive in your recovery they also have the potential to have a negative impact should things not work out the way you want.
This is the most important part I think. While recovering handling the day to day activities and life in general is more important than the training part, even if the two go hand in hand for you.
So, my advice would be
First of all kudos for being where you are now. This is huge in itself.
Whatever training you start, keep it low volume and train week by week without looking at your longer term goals. Whether you are ‘slow’ or ‘fast’ your body can only handle a certain amount in the present. Train for your capabilities at the moment rather than where you want to be.
Give yourself the flexibility to change goals depending on how the initial training goes. If it goes well and IM Whistler is in your view realistic, great. If it turns out not to be change those plans without guilt or regret. That can be a harder but braver decision for both your health and long term sporting ambitions.
Recovery can be a bumpy road so expect those bumps and make sure you have support around you.