The words "abomination" here is a hyperbolic metaphor. The psalmist's friends find him disgusting, but probably not in any religious sense. Alternate translation: "You have made me a disgusting sight to them" or "Because of you, they are shocked when they see me" (See: [[rc://en/ta/man/jit/figs-metaphor]] and [[rc://en/ta/man/jit/figs-hyperbole]])
The writer's physical condition that makes him repulsive to his friends is spoken of as if he were in closed into a confining space. Alternate translation: "It is as though I were in a prison" or "I am trapped" (See: [[rc://en/ta/man/jit/figs-metaphor]])