A senior lawyer for Immigration and Customs Enforcement (Ice) has been sentenced to four years in prison for stealing the identities of immigrants facing deportation and using them to to take out credit cards and run up more than $190,300 in debt.

Raphael Sanchez, formerly the lead attorney for the Seattle Ice office, also used the photograph of a murdered woman on some of the fake identities he created and claimed several deported immigrants as dependents to dodge tax collectors.

Sanchez, who for six years directed Ice legal actions for Alaska and the Pacific north-west, said self-hatred, loneliness and depression drove him to commit fraud.

“I pretended I needed no one and thought material things would bring me happiness, even if temporarily,” Sanchez, 44, said in a letter to the court. “I created an intricate, beautiful, yet soulless house of cards that suddenly came crashing down.”

Sanchez pleaded guilty to wire fraud and aggravated identity theft in February as part of the plea deal that saw him sentenced on Thursday by the US district judge Robert Lasnik in Seattle.

“Sanchez carried the heavy responsibility of speaking for the American government itself, giving voice to the principles of our immigration system and advocating for its fair administration,” said the prosecutor Jessica Harvey in court papers. “Sanchez abandoned the principles he swore to uphold and used his authority merely as a vehicle for personal profit.”

For at least four years, Sanchez culled information from case files on immigrants facing deportation proceedings. He created counterfeit social security cards and driver’s licenses using his victims’ names and birthdates. To dupe the credit bureaus, he concocted bogus utility accounts and income statements.

He then used those stolen identities to open credit cards and bank accounts – and run up debts. Sanchez, who used his personal address on many of the applications, then argued with the credit bureaus when the accounts were flagged as fraudulent.

Many of Sanchez’s victims are likely to have no idea their identities were abused, and prosecutors said that their immigration statuses made it less likely that they would discover and report the fraud.

“Sanchez targeted individuals who had been deported or were otherwise excludable from the United States, leaving them unlikely to discover that he had stolen their identities and unequipped to report it,” Harvey noted in court papers. Harvey and Luke Cass, trial attorneys with the justice department’s public integrity section, prosecuted Sanchez.

Sanchez also lied to the Internal Revenue Service, claiming three immigrants he was impersonating as dependents on his federal tax return.

Facing judgment, Sanchez presented himself as a man undone by psychological scars from wounds he received as a child.

Born in Puerto Rico and raised in New Jersey, Sanchez purports to have survived an abusive upbringing. Writing the court, the defense attorney Cassandra Stamm said Sanchez was left with a tendency toward self-sabotage.

Sanchez joined Ice in 2001 and was promoted to chief counsel at the Seattle office in 2011. He managed Ice attorneys in immigration courts in Alaska, Idaho, Oregon and Washington state.

In a letter to the court, Sanchez described himself as increasingly isolated and depressed before he began stealing identities.

“It became a perfect storm that did not allow me to see the hurtfulness and wrongfulness of my actions,” Sanchez said.

Sanchez was earning $162,000 a year at the time of his arrest.

“Sanchez sold his principles for profit,” Harvey said.

Sanchez, who has been detained since February, was also sentenced to four years of court supervision after his release. He has surrendered his law license.