Re: motivation, I've found it's psychologically hard to come back after a layoff, and under-perform in the gym, compared to previous levels you've achieved in the past.
IMO the most important thing for the average trainee is to (A) just show up at the gym and train your program (at your level you probably know what needs to be done) and (B) don't injure yourself that day. Don't miss workouts, and don't get hurt. Start with a beginner program if necessary, or a scaled back-version of your normal routine. Work out, even if you don't feel "motivated". You don't need to be "motivated" yet, you just need to be at the gym when you're supposed to, and do the workout you're supposed to do.
Try telling yourself that you're going to train for 3 months without missing any workouts, and without criticizing your own progress. At the end of 3 months, evaluate your situation, and then commit to another 3 months. Motivation is something that will grow over time, IMO.
I've never had a major illness but I've had work schedules or school interfere or completely interrupt my training for extended periods. It's like starting all over from scratch, but the good news is that you can make fast progress and get back to where you were, much quicker than it took the first time.