I play the guitar for 12 years (with large intervals).
When I started at the age of 16 I could play up to 6 hours a day with almost no pains.
After some months or years I started to have a muscle pain (probably called abductor pollicis brevis) in my left hand and as a result I played very rarely. The pain starts sometimes after 4 minutes, sometimes after 20... something like that.
I prefer the electric guitar, because the pain is smaller than in the acoustic or classical, but it's a big problem anyway.
What do you recommend? ointment? hand exercises? specific guitar exercises?

Thanks for help!
You're probably not going to like the answers you get, but I don't think anyone here is qualified to tell you anything but to see a doctor about it. Especially over the internet, without knowing anything about you, seeing you play, etc. It could be bad technique, bad posture, or a repetitive strain injury that hasn't properly healed. If it hurts when you play, then I'd definitely stop completely until you figure out why it hurts. If you play through the pain you will most likely cause irreparable damage and never be able to play again, or worse lose the ability to do other things you take for granted now.
Yeah, we can't say for sure what the problem is. The Abductor pollicis brevis is the muscle that might be in pain, but having had a wrist problem not too long ago, I'll tell you now that it's futile to try diagnosing the part and problem yourself. The place where the pain happens may or may not be the place that requires a technique adjustment. The best thing to do is stop when you feel pain.

That said, judging by where you're experiencing the pain, I'd say your problem is most likely excess tension in the thumb. In other words, you're squeezing too hard.

Ideally, your thumb does nothing more than provide some balance and stability. It should not be used for providing the pressure when you fret. Maybe a little when you're doing barres, but most all of the pressure should come from your fingers on the front and your body.

Important questions: does the pain persist when you're not playing? Does it occur at all outside of playing guitar?

If not, you may try to pick up the guitar and approach your playing very slowly. Really pay attention to your left thumb and see if you can fret a chord without the thumb touching the neck at all. Wiggle your thumb and elbow around to see which muscles are in use. You should be able to fret the chord with only the finger muscles, leaving your thumb and arm to do whatever they want. My suspicion is that this exercise will not be easy right away, so take it slowly and make sure you aren't just moving tension further up the arm.

You may also need to adjust your fretting technique, if you're using the finger pads instead of the finger tips.

Again, if you think there might be an actual injury, just stop playing and get it checked out. It takes a lot more time to recover from a repetitive stress injury than to prevent one.
Last edited by cdgraves at Jun 2, 2016,
Thank you for the answer.

Quote by cdgraves

Important questions: does the pain persist when you're not playing? Does it occur at all outside of playing guitar?

Unfortunately I feel the pain a little when I'm holding my phone for a longer time.
Ah bummer i also hurt my wrist and havent been able to play very much for the last 8 months. My left hand would get worn out very fast and i was a one armed carpenter for a long time. Its finally getting stronger but im going to try these techniques. Thanks