I had a similar experience. I essentially allowed my workouts to erode until I stopped working out completely about 5 years ago as I dedicated more time to my job. One morning I woke up and realized that I'd rather be fit and healthy with a diminished position in my job, than attain the highest employment position and be dead by 55. Those are the extremes, and the reality is that they are probably complimentary -- working out and clean diet probably allows me to perform better mentally on the job.
As a 40+ individual who recently started over (6', starting weight 265 lbs in February, BP 149/89, fasted blood glucose level 102 -- "pre-diabetic", could not do 1 body weight chip-up, could not do one body weight dip), here would be my suggestions:
1) You have to fix the diet first. Start a food journal, write everything down. You don't necessarily have to count calories and macronutrient ratios (carbs, protein and fat), but its hard to eat too many calories when you know exactly how many you are eating. It takes about 3600 (12 * 300 lbs -- general guideline) to 4200 (14 * 300 lbs) calories per day to support a non-active man at 300 lbs. Eat less than that. Priority should be on lean proteins first, green and low starch veggies second, fruit third. There will be many here that say you can't eat fruit, but if your diet was as bad as mine (pizza, chicken wings, and beer were staples), then fruit is an improvement. Just about everything else is crap -- don't eat it. You can work out for 4 hours a day, but if you then spend 30 minutes eating pizza, donuts and beer, you will end up with a calorie excess, and your 4 hours in the gym will be wasted (with respect to losing weight). The opposite is true, you can loose weight simply by eating fewer calories (working out is not required -- but generally accepted as helpful). As you drop weight, you'll need to reduce your calories further.
2) Once your diet is in order, I agree with hallowed, go to a gym and work out. As a beginner, anything will work. Start with basic, compound movements, probably full-body type workouts. As a beginner, you'll probably be able to do 2 or 3 sets of: bench, squat, dead lift, and lat-pull downs or rows. Select weights were you can do 6 to 10 reps of each. As you get stronger, add weight. Two sets of, 10 reps, for 4 exercises can easily be completed in less than 1 hour. When the gym wasn't busy, I found I could do it in about 35 minutes. Do it 3 times a week. As you get stronger (say 2 to 6 months later) -- you'll find you are wanting to add sets and additional exercises, and you won't be able to do a full body workout every session. For example, your chest will become "too strong" -- meaning you'll burn up all your energy before you can give you chest AND your legs a good workout. You'll need to "split" it up -- such as lower body one day, and upper body the next day. There are many different "splits." You'll have to figure out when you hit that point.
3) Stick with it. Here's what will happen -- there will be days were you are sore and tired. Your performance at work may suffer on a few days early on -- as some part of your body will have muscle soreness -- and you will be tired. You may feel like skipping work outs -- don't. Over time, you will adapt, and get stronger. You will be able to add weight to your lifts. You'll loose weight (body fat), blood pressure will go down, blood markers will improve. You will feel less tired -- you may even find that you develop an anticipation, a "need" to get that muscle stimulation. It will take time -- but it will come.
4) Get over the gym -- I found it pretty intimidating to go into a gym -- over weight and "old." I was the "fat old guy." I'm in a university town, so there is significant enrichment for 19 to 22 year-olds. Get over it. Frankly, nobody cares. Put on your headphones, put your head down, and just do it. In 5 months, you'll be the "old guy" dead lifting for a "personal best" weight.
I'm still writing my story, but after 5 months, here is where I'm at:
240 lbs (lost 25 lbs)
Blood pressure: 118/72 (I am utterly amazed by this -- would have denied that it was even possible to lower it this much.)
Fasted blood glucose is still high (95 this morning), but I've measured it as low as 93. I'd like to see if I can lower it with more weight loss.
I benched 225 lbs for 3 reps (personal best) and I did 7 body weight dips (personal best) yesterday.
I dead lifted 335 lbs for 5 reps Monday (personal best), and did 3 full chin ups.
Last Friday, I squatted 295 lbs for 5 reps (personal best).
There are a lot of stronger guys (and girls) with great physiques at my gym, but not bad for the "fat old guy." Can't wait to squat tomorrow.