Exclusive

Amber Portwood will lose more than her freedom if she's convicted of going after her boyfriend with a machete -- she will almost certainly lose her gig on "Teen Mom OG."

Production sources tell TMZ ... Amber's already on thin ice following her domestic violence arrest resulting in 3 felony charges -- domestic battery, criminal recklessness with a deadly weapon and domestic battery in the presence of a child.

The dealbreaker for the show ... if a jury believes Amber wielded a machete during a heated argument with bf Andrew Glennon. As we reported ... Amber struck a door with Glennon holding their infant son on the other side.

Our sources say a conviction for the use of a deadly weapon in a domestic violence incident should end her 10-year run on the 'Teen Mom' franchise. We're told the show is letting the legal process play out ... but a conviction will almost certainly be all she wrote.

As rabid 'Teen Mom' fans know ... the show has stood by Amber's side in the past when she weathered other legal storms. You'll recall she was busted for domestic violence in 2010 for hitting her ex, Gary Shirley ... an incident caught by MTV cameras.

Play video content TMZ.com

MTV again stood by Amber when she was busted in 2011 for possession of a controlled substance. She ultimately served time behind bars and later admitted to abusing prescription drugs.

The difference in this case ... putting her son in danger. Aside from the obvious, it's way too much of a risk for a show to keep someone on the air with this kind of propensity for violence, because if she snaps again and the child gets hurt ... the show will have hell to pay.

Amber recently opened up about being bipolar and suffering from borderline personality disorder. She's also talked about postpartum depression. Obviously, all factors will be considered before a final decision is made.