Don't think that what you're feeling is wrong its just how it is.
Maybe the fact is that right now the things of value to you are your wife and family so yeah maybe they are your reason too live. Who gives a f@ck what your reason for wanting to live is if it's to count Jelly beans so be it.
As to your pain inside I think most of us have parts that hurt. There's lots of ways that people avoid facing it, humor is a pretty good way.
IC be understanding, kind, forgiving and gentle with yourself.