Okay, resigning here isn't as bad as resigning on move 22, when you have a won game, but ... even still, you need to play positions like this out. This is not anywhere close to resignable for a player who has as much to learn as you do.
Couple of notes on the game:
WHile I think the exchange ruy is a reasonable choice for white against a computer, you have to recognize that by 4.Bxc6 you're commiting to trying to win an endgame, so you need to play d4 to create a pawn majority on the kingside. Play over some exchange ruy games to understand this. Otherwise, don't play Bxc6.
Ne1 is premature. Finish your development before you attack.
I'm not crazy about f5, although it's part of one reasonable strategy here. Instead I prefer Bb2 with fxe5, putting pressure on the black center.
Qg4 is a lazy move. The idea of using your kingside space advantage to launch an attack there is reasonable ... but why you would think such an attack could be successful while your two minor pieces are undeveloped makes no sense. Also, quite simply, you can't just ignore your opponent's threats. Your only hope for an attack here is Rf3-g3/h3 (and I'm not convinced that the g-file is the right file here) so you need to think ahead and figure out how you're going to get your pieces involved once he starts gobbling pawns BEFORE you throw peices wily-nily at the black king.
On move 16, do you see how both the N and B could be more effective pieces if you had played fxe5? Then Nf3 would threaten Nxe5 and Ng5 (now the N has no good advanced squares) and the bishop doesn't have much scope, either.
Black has you completely busted at move 20. But Nf4 ... that's a poor move. He needs to consolidate his development, and you're done. You need to play 21.Qxe5, undermining his center and weakening the knight ... instead of c3, which gives you another weak pawn.
22.g3?? is another blunder. You recognize the knight as a target, and want to get it to move, but fail to see that after Qxe5 it's hanging. No pawn attack necessary. This weakning of your king position proves dangerous later.
After 25.Rg2 you're worse, but should play this out. Given the lack of tactical vision displayed by both players, you shouldn't concede this yet.