I am so sorry for your loss. They say loss is the toughest thing we will ever have to face. It sounds like you were very close. I also know that having issues with our heart, especially ongoing issues that need a pacemaker to solve, can also cause some depression so I would not doubt that it's a little of both contributing. I am glad you are seeing your doctor about this. It is nothing to be ashamed about. Life is hard sometimes. Crying is good. It helps release the grief and sadness and despair so allow yourself to have a good cry if you need to. Maybe consider finding a grief support group. I know hospitals offer free ones. Talking it out with others who have also lost a loved one may help you move on. And do consider seeing a therapist if your doctor recommends it. Talking through not just the loss but how the pacemaker and the loss are affecting how you feel about yourself and life may help you move past this. Depression isn't easy so be gentle with yourself. It takes time to work through it but until your appointment you may want to consider trying to find the support group and maybe even jumping on the depression forum on this site
http://www.medhelp.org/forums/Depression/show/57 to speak with others who struggle with it. I wish you love and hope as you work through this. You can get through it and find better days on the other side. Hugs.