Barely five weeks ago, Alfonso Gomez wasn’t thinking about Miguel Cotto. He was thinking about dying.

Well along in his preparation for Saturday night’s WBA welterweight title fight at Boardwalk Hall in Atlantic City with the undefeated Cotto, Gomez began to feel tired and run down. The harder he worked the worse he felt until he finally found himself hospitalized in California. That would be the beginning of what has become another test of his will and his faith in himself, a test whose final exam will come Saturday night.

“At first the doctors believed I had pancreatitis,’’ Gomez said this week while relaxing in a Manhattan hotel room before his journey to the Jersey shore. “The doctors told my family I had a blood clot in my pancreas and that if it began to move I could die. My father got real sick after he heard that and I got really depressed.

“My mental state went down. It brought all my defenses down, mentally and physically. I thought about pulling out of the fight but I was afraid if I let it go it might not come again. It was a bad week.’’

Gomez and his family have been through many bad weeks in life. Growing up in poverty first in Mexico and then in southern California, he had seen his family’s car repossessed and his house foreclosed upon. He had seen his parents work and worry most of their lives until he finally hit the jackpot by winning the $350,000 third prize in the first year of “The Contender’’ reality TV series.

Gomez won more than money from The Contender however. He also won the hearts of millions of fans who fell in love with his wide smile, glib sense of humor and hard-nosed approach to both boxing and the difficulties of life. If ever he needed both the former and the latter, five weeks ago was it.

“After a week of tests in the hospital they said it was actually something less serious than they thought,’’ Gomez recalled. “Some kind of viral infection or something. They got me on some medicine and told me to rest for a week and I started to feel better every day.’’

Despite his improving health, Gomez (18-3-2, 8 KO) knew he had lost two valuable weeks of training for an opponent who is not only the best he has ever faced by a wide margin but arguably the most dangerous welterweight in the world. Something had to be done to try and make up for lost time because the other option, the one many fighters would have taken was not one he accepted. He would not pull out.

So with only three weeks left of hard training time before he would come East, Gomez for the first time added a physical trainer to his team and went to back work in earnest.

“At first I didn’t feel like I could beat Cotto because of the way I felt,’’ Gomez said. “My family didn’t want me to fight. It was very difficult. I thought maybe I could wait and fight the loser in the (Shane) Mosley-Zab Judah fight or maybe Jose Luis Castillo if he could make the weight but at the end of the day I didn’t want to let go of this.

‘There’s a poem by Robert Greenleaf Whittier that goes:

“For of all sad words of tongue or pen/ The saddest are these: 'It might have been!'”

“I didn’t want to look back and have to say I could have been world champion but I didn’t take the chance. I don’t want to grow old and say ‘If only’ or ‘I might have.’ So I decided to get a physical conditioner for the first time and do everything in my power to beat him. I’ve done that. If he beats me, there are no excuses.

“There’s no risk to my health now so what is there to fear? Nothing. However it turns out, I won’t regret anything.’’

That has been how Gomez has lived his life since he was a young dreamer convinced he was destined for bigger things than his early circumstances would have seemed to dictate. When he failed to make the Mexican Olympic boxing team by one victory eight years ago, he simply turned professional without fanfare and won a split decision in his first fight. It was the first of many reminders that nothing would come easy.

He lost his second fight, to future Contender teammate Ishe Smith, by a decision that would have been a draw had Gomez not been penalized a point in the third of the fight’s four rounds for two low blows. That didn’t stop him either and neither did the time he spent as a young sparring partner for a hot commodity named Panchito Bojado, who was supposed to become boxing’s next big thing.

Bojado was everything Gomez was not. He was a former Olympian who had signed with one of the biggest promoters in America, Kathy Duva’s Main Events. Gomez, meanwhile, was an afterthought, although not to the only person that truly mattered. Not to himself.

“I used to try to get him fights on the undercard when Bojado was fighting,’’ recalled then Main Events matchmaker Carl Moretti. “I have to be honest. I didn’t think much of his talent. He was a great kid but where was he going?

“Gomez is limited but he believes he’s better than he is. He has the ego and the confidence of a fighter who’s better than his talent and that self-confidence allows him to fight better than his talent should allow.

“He’s gotten everything out of his ability. He has courage and will. He’s become a professional fighter and look at him now. He’s fighting for a world championship and he’s got a huge fan base from The Contender and where’s Bojado?’’

No where when it comes to boxing, but that is not the case for Gomez, who despite being a decided underdog Saturday night will show up in the arena believing in the one thing he has always believed in.

“I’ve been through a lot in life and it’s made me a strong-minded person,’’ Gomez said. “Maybe getting sick was a test. Would I take it like a man and choose to fight or would I quit?

“I’m not the fastest fighter. I don’t have the biggest power punch. I’m not a good athlete at all. I lost at every one of the contests we had to do on the Contender except for the fighting. All my fights have been against someone who was bigger or better or bigger and better but mostly I’ve won.

“My conditioning coach tells me I’m unique that way. I’m not even flexible. I can barely touch my toes with my hands. But I believe my mind is so powerful I’m able to overcome all the lacks that I have.’’

That includes the lack of a full training camp and the lack of those two weeks when he was wondering more about whether he would live or die than if he would be fighting again. All of that is behind him now though and on April 12 only two things will matter – Miguel Cotto and the guy across from him.

“Cotto is one of the best fighters in the welterweight division,’’ Gomez said. “It’s not a coincidence he’s undefeated and been a world champion in two weight classes but I hope he doesn’t think I’ll be a walk in the park. It’s a mistake if he overlooks me. He may feel invincible. He may feel superior to everybody but that’s a mistake.

“This is a great opportunity for me to help myself and help my family. I got nothing to lose and all to gain. I got a lot of will and he’s not the only guy in there with two fists. It’s two guys with two fists and I’ll be coming at him with a hard jab, moving to the side, punching him in the body.’’

Gomez’s manager, Gary Gittlesohn, understands what his fighter is up against even if he’d been in the pink of health throughout training and willingly concedes the challenge he’s facing. He knows what Cotto (31-0, 25 KO) is. Yet when it came time to make the fight, he did not hesitate.

“Look, we don’t need to shade this,’’ Gittlesohn said. “Miguel Cotto is a great champion and a great fighter at the top of his game. It’s a very big hurdle for Arturo to clear. I don’t know how anyone could say Cotto’s not a great fighter. He’s fought great fighters and left nothing to chance. He’s very heavy handed but I’m banking on him not taking Alfonso seriously. He hasn’t shown that he’s motivated for this fight. I don’t think he thinks much of Alfonso. He’s said as much in his interviews. I don’t think he’s even said his name.

“He’s a great fighter but he’s not unbeatable. No one is unbeatable and he’s in against a kid who always seems to do more than he’s expected to do.

“Obviously this is a difficult fight but there has to be a trajectory to a career. At some point you make a decision whether you’re a Contender fighter or an ESPN fighter or you take a bigger chance on a bigger stage. I know this. Alfonso is very sure of himself. He knows who he is.’’

He also knows who Cotto is. He knows and, he insisted this week, he’s not intimidated at the thought of it just as he’s not fearful that his difficult training camp will haunt him come fight night.

“I know he’s dangerous,’’ Gomez said of Cotto. “Every minute with him is dangerous. But I’m dangerous too. Arturo Gatti found that out. In the ring it’s always a tense situation but I knew one day I’d be in this position. This is my moment.’’

A moment that nearly didn’t come and a moment many fighters would have turned their back on while lying on their back in that hospital bed. Alfonso Gomez, win or lose, is not that kind of guy.

“As a kid I used to visualize that I’d be a star, a guy who made it,’’ Gomez recalled. “It was just a matter of would I keep believing and I did. I always go for it. I don’t quit, believe me.’’

He proved that simply by getting out of that hospital bed, back into training and showing up when many would have made another choice.