When I was seriously heavy, the guy who got me back on the bike was one of those annoying whippet type guys. 5'6" 140 lbs or something like that. I was was 6'2" 240 and often had to walk the bike up that last hill, trying not to puke. We rode every work day for our hour lunch. By the end of the first year I was crushing him on the flats in a sprint and leading up the hill.
Keep riding. If you have to sit and spin in your smallest gear do it. Keep trying. From mtn biking try to keep your weight 60/40 over the back wheel to keep from spinning your wheel or popping the front off the ground.
Hills aren't my friends but I don't avoid them and use them to train for upcoming events. Four times up and down the escarpment helps for the centuries.