Joe Giudice is tired of being kept behind bars and feels the least the judge can do is let him out to see his family ... especially if he's going to get deported soon anyway.
Sources close to Teresa's husband tell TMZ ... he'll have a bond hearing Wednesday morning in a Pennsylvania immigration court to decide whether he can be released from ICE custody while he's appealing his deportation case.
We're told Joe's extended family will be attending along with Teresa, but not his kids. Joe won't physically be in the courtroom, as he's being held some hours away at the Clinton County Correctional Facility ... but he'll appear by video.
Our sources say the former 'Real Housewives of New Jersey' star is extremely homesick and believes he's getting a raw deal ... remaining behind bars.
Joe went to prison in March 2016 and has been detained ever since, even after serving his 41-month sentence for conspiracy to commit wire and bankruptcy fraud.
As we reported ... he was released from federal prison in March but was immediately transferred to ICE custody, because a judge ordered him to be deported to his native Italy once he got out. However, Giudice appealed that decision and lost, but appealed again to a higher court ... which is where the case stands now.
We're told Joe just wants to be able to return home to New Jersey while he waits for a final ruling.
The Giudice family attorney, James Leonard Jr., tells us ... "What is happening to Joe Giudice and to his family and thousands of other families regarding these draconian immigration laws is nothing short of inhumane."
He adds ... "We are praying for some sort of relief tomorrow from the Court. This family has paid their debt to society and then some. Enough is enough."