Once you gain weight - no matter how or why you gained it - it's weight you have to lose like any other weight. You'll have to exercise, maintain a certain caloric intake based on your activity level, etc.
What's wrong with your sex drive? Are you sure it's a physical thing and not something psychological that's driving you to make certain choices?
See your doctor and get some hormone level testing. Perhaps you have really high levels of testosterone. If everything checks out there, then try to figure out if it's something psychological, and address that appropriately before taking something that may or may not work for you and may give you undesired side effects.