The Gloucester County Special Weapons and Tactics team responded to the scene at East Holly Avenue in Pitman early Thursday after the man's female companion told police she thought she had heard a gunshot. The prosecutor's office says the man had told his ex-wife that he intended to harm himself.
Prosecutor's spokesman Bernie Weisenfeld says a weapon was found on the floor near the man's body.
His name has not been released.
Neighboring homes were evacuated and the nearby Pitman Middle School was closed as a precaution.