I'm a physical therapist who treats this often in laborers, rock climbers, and golfers. I'm also a TPI certified PT who i work with golfers in that regard as well. medial or lateral epicondylitis/algia can be a pickle to work through. Very rarely is the painful tissue the problem. There's a very strong correlation to lateral epi and shoulder external rotator weakness, like previous or current rotator cuff pathology for example. In the golf swing there really shouldn't be any excessive stress to the epicondyles and the adjacent tendons unless A. that muscle was severely atrophied then you hit golf hard (not very plausible), B. you've got insufficient shoulder motion/strength that your elbow is compensating for, or C. you've exhausted the potential of that elbow muscle tissue from some wacky forearm rotation that you shouldn't be doing, unless this again was a compensation started after something else went awry in the swing.
Either way, treat it before the -itis becomes a -osis (chronic inflammation) or turns further into an -opathy (mechanical changes to the chronically inflamed and destroyed tendon). a properly treated -itis should last no more than 4-6 weeks. -opathies can take several months and even require adjunct treatments like PRP, autologis blood injections, TENEX procedures, etc which still aren't great. Go get it looked at by a good PT with golf training. Look for suffixes in their experience like OCS, COMT, FAAOMPT, TPI, for example. Cheers!
The painful part is rarely the problem. It's often the smoke signal but not the fire.