I understand why you feel this way, but more importantly, God understands how you feel, and He doesn’t condemn you for it. But God also has something better in store for you, and He wants to help you discover it.
What does God want to do in your life? He doesn’t just want to get you back in church (although that will become part of it). But what God wants to do right now is to bring you closer to Himself, and to fill you with His love and grace. The Bible says that God is “gracious and compassionate, slow to anger and abounding in love” (Nehemiah 9:17).
Losing your spouse has been very painful, I’m sure, and you won’t get over it quickly (as I know from personal experience). But God loves you, and even in the midst of your grief and loneliness, God wants to fill the empty places in your heart. If you’ve never done so, or if you are unsure, turn to Jesus Christ today and by faith ask Him to come into your life.
How will He fill those empty places? One way is through your church — through worship and hearing His Word as it is preached, and also through your contact with other believers. Ask God for the courage to be with others in your church. But more than that, ask Him to help you reach out to people in your church who may be just as lonely as you are. They need you — and you need them.